| 398 | |
| 399 | template<typename T> |
| 400 | void Array<T>::setTo(const T value) |
| 401 | { |
| 402 | try |
| 403 | { |
| 404 | if (mVolume > 0) |
| 405 | { |
| 406 | // OpenCV is efficient on copying (AVX, SSE, etc.) |
| 407 | if (mCvMatData.first) |
| 408 | mCvMatData.second.setTo((double)value); |
| 409 | else |
| 410 | for (auto i = 0u ; i < mVolume ; i++) |
| 411 | operator[](i) = value; |
| 412 | } |
| 413 | } |
| 414 | catch (const std::exception& e) |
| 415 | { |
| 416 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 417 | } |
| 418 | } |
| 419 | |
| 420 | template<typename T> |
| 421 | int Array<T>::getSize(const int index) const |
no test coverage detected