| 162 | * run the test case |
| 163 | */ |
| 164 | template <typename ElemType> bool |
| 165 | GemvPerformanceTest<ElemType>::areResourcesSufficient(TestParams *params) |
| 166 | { |
| 167 | clMath::BlasBase *base; |
| 168 | size_t gmemSize, allocSize, maxMatrSize; |
| 169 | size_t m = params->M, n = params->N; |
| 170 | |
| 171 | base = clMath::BlasBase::getInstance(); |
| 172 | gmemSize = (size_t)base->availGlobalMemSize(0); |
| 173 | allocSize = (size_t)base->maxMemAllocSize(); |
| 174 | |
| 175 | maxMatrSize = gmemSize / 3; |
| 176 | |
| 177 | maxMatrSize = std::min(maxMatrSize, allocSize); |
| 178 | |
| 179 | return (m * n * sizeof(ElemType) < maxMatrSize); |
| 180 | } |
| 181 | |
| 182 | template <typename ElemType> int |
| 183 | GemvPerformanceTest<ElemType>::prepare(void) |
no test coverage detected