<commit_before>.TH WEIGHTED_SUM "9" "2007-01-16" "EMC Documentation" "HAL Component"
.SH NAME
weighted_sum \- convert a group of bits to an integer
.SH SYNOPSIS
.B loadrt weighted_sum wsum_sizes=\fIsize[,size,...]\fR
.P
Creates weighted sum groups each with the given number of input bits
(\fIsize\fR).
.SH DESCRIPTION
This component is a "weighted summer": Its output is the offset plus the sum of
the weight of each TRUE input bit.  The default value for each weight is 2^n
where n is the bit number.  This results in a binary to unsigned conversion.

There is a limit of 8 weighted summers and each may have up to 16 input bits.
.SH FUNCTIONS
.TP
.B process_wsums
Read all input values and update all output values.
.SH PINS
.TP
.B wsum.\fIN\fB.bit.\fIM\fB.in\fR bit in 
The \fIm\fR'th input of weighted summer \fIn\fR.
.TP
.B wsum.\fIN\fB.hold\fR bit in
When TRUE, the \fIsum\fR output does not change.  When FALSE, the \fIsum\fR
output tracks the \fIbit\fR inputs according to the weights and offset.
.TP
.B wsum.\fIN\fB.sum\fR unsigned out
The output of the weighted summer
.SH PARAMETERS
.TP
.B wsum.\fIN\fB.bit.\fIM\fB.weight\fR unsigned rw
The weight of the \fIm\fR'th input of weighted summer \fIn\fR.  The default
value is 2^\fIm\fR.
.TP
.B wsum.\fIN\fB.offset\fR unsigned rw
The offset is added to the weights corresponding to all TRUE inputs to give the
final sum.<commit_msg>from branch: acemi noted that these are signed, not unsigned<commit_after>.TH WEIGHTED_SUM "9" "2007-01-16" "EMC Documentation" "HAL Component"
.SH NAME
weighted_sum \- convert a group of bits to an integer
.SH SYNOPSIS
.B loadrt weighted_sum wsum_sizes=\fIsize[,size,...]\fR
.P
Creates weighted sum groups each with the given number of input bits
(\fIsize\fR).
.SH DESCRIPTION
This component is a "weighted summer": Its output is the offset plus the sum of
the weight of each TRUE input bit.  The default value for each weight is 2^n
where n is the bit number.  This results in a binary to unsigned conversion.

There is a limit of 8 weighted summers and each may have up to 16 input bits.
.SH FUNCTIONS
.TP
.B process_wsums
Read all input values and update all output values.
.SH PINS
.TP
.B wsum.\fIN\fB.bit.\fIM\fB.in\fR bit in 
The \fIm\fR'th input of weighted summer \fIn\fR.
.TP
.B wsum.\fIN\fB.hold\fR bit in
When TRUE, the \fIsum\fR output does not change.  When FALSE, the \fIsum\fR
output tracks the \fIbit\fR inputs according to the weights and offset.
.TP
.B wsum.\fIN\fB.sum\fR signed out
The output of the weighted summer
.SH PARAMETERS
.TP
.B wsum.\fIN\fB.bit.\fIM\fB.weight\fR signed rw
The weight of the \fIm\fR'th input of weighted summer \fIn\fR.  The default
value is 2^\fIm\fR.
.TP
.B wsum.\fIN\fB.offset\fR signed rw
The offset is added to the weights corresponding to all TRUE inputs to give the
final sum.
{'fraction_non_alphanumeric': 0.08584604469670096, 'fraction_numerical': 0.009932600212841433, 'mean_word_length': 3.44794952681388, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7631533', 'n_tokens_mistral': 1034, 'n_tokens_neox': 953, 'n_words': 434}