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

Function covariance_d

cmp_framework/common/hdr_encode.cpp:1205–1218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1203}
1204
1205void covariance_d(float data[][MAX_DIMENSION_BIG], int numEntries, float cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG], int dimension) {
1206 int i, j, k;
1207
1208 for (i = 0; i<dimension; i++)
1209 for (j = 0; j <= i; j++) {
1210 cov[i][j] = 0;
1211 for (k = 0; k<numEntries; k++)
1212 cov[i][j] += data[k][i] * data[k][j];
1213 }
1214
1215 for (i = 0; i<dimension; i++)
1216 for (j = i + 1; j<dimension; j++)
1217 cov[i][j] = cov[j][i];
1218}
1219
1220void centerInPlace_d(float data[][MAX_DIMENSION_BIG], int numEntries, float mean[MAX_DIMENSION_BIG], int dimension) {
1221 int i, k;

Callers 1

optQuantAnD_dFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected