| 1131 | |
| 1132 | template <typename T> |
| 1133 | static void |
| 1134 | populate(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 | |
| 1160 | template<> |
| 1161 | __template_static void |
no test coverage detected