MCPcopy Create free account
hub / github.com/GPUOpen-Tools/compressonator / centerInPlace_d

Function centerInPlace_d

cmp_framework/common/hdr_encode.cpp:1220–1237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1218}
1219
1220void centerInPlace_d(float data[][MAX_DIMENSION_BIG], int numEntries, float mean[MAX_DIMENSION_BIG], int dimension) {
1221 int i, k;
1222
1223 for (i = 0; i<dimension; i++) {
1224 mean[i] = 0;
1225 for (k = 0; k<numEntries; k++)
1226 mean[i] += data[k][i];
1227 }
1228
1229 if (!numEntries)
1230 return;
1231
1232 for (i = 0; i<dimension; i++) {
1233 mean[i] /= (float)numEntries;
1234 for (k = 0; k<numEntries; k++)
1235 data[k][i] -= mean[i];
1236 }
1237}
1238
1239void eigenVector_d(float cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG], float vector[MAX_DIMENSION_BIG], int dimension) {
1240 // calculate an eigenvecto corresponding to a biggest eigenvalue

Callers 1

optQuantAnD_dFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected