| 639 | |
| 640 | template<typename T> |
| 641 | void ArrayCpuGpu<T>::set_gpu_data(T* data) |
| 642 | { |
| 643 | try |
| 644 | { |
| 645 | #if defined(USE_CAFFE) && (defined(USE_CUDA) || defined(USE_OPENCL)) |
| 646 | spImpl->pCaffeBlobT->set_gpu_data(data); |
| 647 | #else |
| 648 | UNUSED(data); |
| 649 | error("Required `USE_CAFFE` and `USE_CUDA` flags enabled.", __LINE__, __FUNCTION__, __FILE__); |
| 650 | #endif |
| 651 | } |
| 652 | catch (const std::exception& e) |
| 653 | { |
| 654 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 655 | } |
| 656 | } |
| 657 | |
| 658 | template<typename T> |
| 659 | const T* ArrayCpuGpu<T>::cpu_diff() const |