| 712 | |
| 713 | template<typename T> |
| 714 | T* ArrayCpuGpu<T>::mutable_gpu_data() |
| 715 | { |
| 716 | try |
| 717 | { |
| 718 | #if defined(USE_CAFFE) && (defined(USE_CUDA) || defined(USE_OPENCL)) |
| 719 | return spImpl->pCaffeBlobT->mutable_gpu_data(); |
| 720 | #else |
| 721 | error("Required `USE_CAFFE` and `USE_CUDA` flags enabled.", __LINE__, __FUNCTION__, __FILE__); |
| 722 | return nullptr; |
| 723 | #endif |
| 724 | } |
| 725 | catch (const std::exception& e) |
| 726 | { |
| 727 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 728 | return nullptr; |
| 729 | } |
| 730 | } |
| 731 | |
| 732 | template<typename T> |
| 733 | T* ArrayCpuGpu<T>::mutable_cpu_diff() |