| 406 | |
| 407 | template<typename T> |
| 408 | int ArrayCpuGpu<T>::width() const |
| 409 | { |
| 410 | try |
| 411 | { |
| 412 | #ifdef USE_CAFFE |
| 413 | return spImpl->pCaffeBlobT->width(); |
| 414 | #else |
| 415 | return -1; |
| 416 | #endif |
| 417 | } |
| 418 | catch (const std::exception& e) |
| 419 | { |
| 420 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 421 | return -1; |
| 422 | } |
| 423 | } |
| 424 | |
| 425 | template<typename T> |
| 426 | int ArrayCpuGpu<T>::LegacyShape(const int index) const |