MCPcopy Create free account
hub / github.com/clMathLibraries/clBLAS / populate

Function populate

src/tests/include/blas-random.h:1133–1158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1131
1132template <typename T>
1133static void
1134populate(T* data, size_t rows, size_t cols, size_t lda, BlasRoutineID BlasFn, int creationFlags = 0)
1135{
1136 cl_double bound;
1137 bound = UPPER_BOUND<T>();
1138 cl_double biggest = (cl_double)std::max( rows, cols);
1139
1140 switch( BlasFn )
1141 {
1142 case CLBLAS_TRMV:
1143 bound = sqrt( ((biggest - 1)* bound) / (biggest * biggest));
1144 break;
1145
1146 case CLBLAS_SYMM:
1147 case CLBLAS_HER:
1148 case CLBLAS_HER2:
1149 case CLBLAS_HEMM:
1150 case CLBLAS_HERK:
1151 case CLBLAS_GER: // Taking cube root because of Alpha factor- (alpha*X*Y)
1152 bound = pow( (((biggest - 1)* bound) / (biggest * biggest)), ((double)1/3) );
1153 break;
1154
1155 default : ::std::cerr << "Invalid function ID sent to populate!" << ::std::endl;
1156 }
1157 doPopulate( data, rows, cols, lda, 1, bound, creationFlags);
1158}
1159
1160template<>
1161__template_static void

Callers 13

trmvCorrectnessTestFunction · 0.85
tpmvCorrectnessTestFunction · 0.85
hemmCorrectnessTestFunction · 0.85
gerCorrectnessTestFunction · 0.85
symmCorrectnessTestFunction · 0.85
gercCorrectnessTestFunction · 0.85
prepareMethod · 0.85
prepareMethod · 0.85
prepareMethod · 0.85
prepareMethod · 0.85
prepareMethod · 0.85
prepareMethod · 0.85

Calls 1

doPopulateFunction · 0.85

Tested by

no test coverage detected