Changeset 33888 for branches/eam_branches/ipp-20120405/Ohana
- Timestamp:
- May 17, 2012, 11:17:55 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120405/Ohana/src
- Files:
-
- 3 edited
-
libohana/include/ohana_sort.h (modified) (1 diff)
-
libohana/src/sorts.c (modified) (1 diff)
-
opihi/cmd.data/vstats.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120405/Ohana/src/libohana/include/ohana_sort.h
r27435 r33888 73 73 void fsortthree (float *X, float *Y, float *Z, int N); 74 74 void dsortthree (double *X, double *Y, double *Z, int N); 75 void fsortfour (float *X, float *Y, float *Z, float *W, int N); 76 void dsortfour (double *X, double *Y, double *Z, double *W, int N); 75 77 76 78 #endif -
branches/eam_branches/ipp-20120405/Ohana/src/libohana/src/sorts.c
r27435 r33888 120 120 121 121 } 122 123 void fsortfour (float *X, float *Y, float *Z, float *W, int N) { 124 125 # define SWAPFUNC(A,B){ float tmp; \ 126 tmp = X[A]; X[A] = X[B]; X[B] = tmp; \ 127 tmp = Y[A]; Y[A] = Y[B]; Y[B] = tmp; \ 128 tmp = Z[A]; Z[A] = Z[B]; Z[B] = tmp; \ 129 tmp = W[A]; W[A] = W[B]; W[B] = tmp; \ 130 } 131 # define COMPARE(A,B)(X[A] < X[B]) 132 133 OHANA_SORT (N, COMPARE, SWAPFUNC); 134 135 # undef SWAPFUNC 136 # undef COMPARE 137 138 } 139 140 void dsortfour (double *X, double *Y, double *Z, double *W, int N) { 141 142 # define SWAPFUNC(A,B){ double tmp; \ 143 tmp = X[A]; X[A] = X[B]; X[B] = tmp; \ 144 tmp = Y[A]; Y[A] = Y[B]; Y[B] = tmp; \ 145 tmp = Z[A]; Z[A] = Z[B]; Z[B] = tmp; \ 146 tmp = W[A]; W[A] = W[B]; W[B] = tmp; \ 147 } 148 # define COMPARE(A,B)(X[A] < X[B]) 149 150 OHANA_SORT (N, COMPARE, SWAPFUNC); 151 152 # undef SWAPFUNC 153 # undef COMPARE 154 155 } -
branches/eam_branches/ipp-20120405/Ohana/src/opihi/cmd.data/vstats.c
r32632 r33888 144 144 } 145 145 } 146 stdev = sqrt (var / N);146 stdev = sqrt (var / (N - 1)); 147 147 148 148 Nmode = 0;
Note:
See TracChangeset
for help on using the changeset viewer.
