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

Function GetEndPoints

cmp_core/shaders/bc6_encode_kernel.cpp:700–746  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

698}
699
700void GetEndPoints(CGU_FLOAT EndPoints[MAX_SUBSETS][MAX_END_POINTS][MAX_DIMENSION_BIG],
701 CGU_FLOAT outB[MAX_SUBSETS][MAX_SUBSET_SIZE][MAX_DIMENSION_BIG],
702 CGU_INT max_subsets,
703 int entryCount[MAX_SUBSETS])
704{
705 // Should have some sort of error notification!
706 if (max_subsets > MAX_SUBSETS)
707 return;
708
709 // Save Min and Max OutB points as EndPoints
710 for (int subset = 0; subset < max_subsets; subset++)
711 {
712 // We now have points on direction vector(s)
713 // find the min and max points
714 CGU_FLOAT min = CMP_HALF_MAX;
715 CGU_FLOAT max = 0;
716 CGU_FLOAT val;
717 int mini = 0;
718 int maxi = 0;
719
720 for (int i = 0; i < entryCount[subset]; i++)
721 {
722 val = outB[subset][i][0] + outB[subset][i][1] + outB[subset][i][2];
723 if (val < min)
724 {
725 min = val;
726 mini = i;
727 }
728 if (val > max)
729 {
730 max = val;
731 maxi = i;
732 }
733 }
734
735 // Is round best for this !
736 for (int c = 0; c < MAX_DIMENSION_BIG; c++)
737 {
738 EndPoints[subset][0][c] = outB[subset][mini][c];
739 }
740
741 for (int c = 0; c < MAX_DIMENSION_BIG; c++)
742 {
743 EndPoints[subset][1][c] = outB[subset][maxi][c];
744 }
745 }
746}
747
748void covariance_d(CGU_FLOAT data[][MAX_DIMENSION_BIG], CGU_INT numEntries, CGU_FLOAT cov[MAX_DIMENSION_BIG][MAX_DIMENSION_BIG], CGU_INT dimension)
749{

Callers 2

FindBestPatternFunction · 0.70
FindBestPatternMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected