| 169 | * run the test case |
| 170 | */ |
| 171 | template <typename ElemType> bool |
| 172 | SymvPerformanceTest<ElemType>::areResourcesSufficient(TestParams *params) |
| 173 | { |
| 174 | clMath::BlasBase *base; |
| 175 | size_t gmemSize, allocSize, maxMatrSize; |
| 176 | size_t n = params->N; |
| 177 | |
| 178 | base = clMath::BlasBase::getInstance(); |
| 179 | gmemSize = (size_t)base->availGlobalMemSize(0); |
| 180 | allocSize = (size_t)base->maxMemAllocSize(); |
| 181 | |
| 182 | if((A_ == NULL) || (backC_ == NULL) || (C_ == NULL) || (B_ == NULL)) |
| 183 | { |
| 184 | return 0; // Not enough memory for host arrays |
| 185 | } |
| 186 | |
| 187 | |
| 188 | maxMatrSize = gmemSize / 3; |
| 189 | |
| 190 | maxMatrSize = std::min(maxMatrSize, allocSize); |
| 191 | |
| 192 | return (n * n * sizeof(ElemType) < maxMatrSize); |
| 193 | } |
| 194 | |
| 195 | template <typename ElemType> int |
| 196 | SymvPerformanceTest<ElemType>::prepare(void) |
no test coverage detected