blob: 6d0b4c13a498fab41cac239ed673b201e4fbc8ff [file] [log] [blame]
/* Compute the sum of the squares of a vector of signed shorts
* Portable C version
* Copyright 2004 Phil Karn, KA9Q
* May be used under the terms of the GNU Lesser General Public License (LGPL)
unsigned long long sumsq_port(signed short *in,int cnt){
long long sum = 0;
int i;
sum += (int)in[i] * (int)in[i];
return sum;