Lines Matching defs:Sum
19 Returns the sum of all elements in a buffer in unit of UINT8.
22 This function calculates the sum of all elements in a buffer
30 @param Buffer The pointer to the buffer to carry out the sum operation.
33 @return Sum The sum of Buffer with carry bits dropped during additions.
43 UINT8 Sum;
49 for (Sum = 0, Count = 0; Count < Length; Count++) {
50 Sum = (UINT8) (Sum + *(Buffer + Count));
53 return Sum;
61 This function first calculates the sum of the 8-bit values in the
63 of addition are dropped. Then, the two's complement of the sum is
93 Returns the sum of all elements in a buffer of 16-bit values. During
96 This function calculates the sum of the 16-bit values in the buffer
105 @param Buffer The pointer to the buffer to carry out the sum operation.
108 @return Sum The sum of Buffer with carry bits dropped during additions.
118 UINT16 Sum;
128 for (Sum = 0, Count = 0; Count < Total; Count++) {
129 Sum = (UINT16) (Sum + *(Buffer + Count));
132 return Sum;
140 This function first calculates the sum of the 16-bit values in the buffer
142 are dropped. Then, the two's complement of the sum is returned. If Length
175 Returns the sum of all elements in a buffer of 32-bit values. During
178 This function calculates the sum of the 32-bit values in the buffer
187 @param Buffer The pointer to the buffer to carry out the sum operation.
190 @return Sum The sum of Buffer with carry bits dropped during additions.
200 UINT32 Sum;
210 for (Sum = 0, Count = 0; Count < Total; Count++) {
211 Sum = Sum + *(Buffer + Count);
214 return Sum;
222 This function first calculates the sum of the 32-bit values in the buffer
224 are dropped. Then, the two's complement of the sum is returned. If Length
257 Returns the sum of all elements in a buffer of 64-bit values. During
260 This function calculates the sum of the 64-bit values in the buffer
269 @param Buffer The pointer to the buffer to carry out the sum operation.
272 @return Sum The sum of Buffer with carry bits dropped during additions.
282 UINT64 Sum;
292 for (Sum = 0, Count = 0; Count < Total; Count++) {
293 Sum = Sum + *(Buffer + Count);
296 return Sum;
304 This function first calculates the sum of the 64-bit values in the buffer
306 are dropped. Then, the two's complement of the sum is returned. If Length