| 675 | |
| 676 | template<typename T> |
| 677 | const T* ArrayCpuGpu<T>::gpu_diff() const |
| 678 | { |
| 679 | try |
| 680 | { |
| 681 | #if defined(USE_CAFFE) && (defined(USE_CUDA) || defined(USE_OPENCL)) |
| 682 | return spImpl->pCaffeBlobT->gpu_diff(); |
| 683 | #else |
| 684 | error("Required `USE_CAFFE` and `USE_CUDA` flags enabled.", __LINE__, __FUNCTION__, __FILE__); |
| 685 | return nullptr; |
| 686 | #endif |
| 687 | } |
| 688 | catch (const std::exception& e) |
| 689 | { |
| 690 | error(e.what(), __LINE__, __FUNCTION__, __FILE__); |
| 691 | return nullptr; |
| 692 | } |
| 693 | } |
| 694 | |
| 695 | template<typename T> |
| 696 | T* ArrayCpuGpu<T>::mutable_cpu_data() |