| 175 | void caffe_gpu_set(const int N, const Dtype alpha, Dtype *X); |
| 176 | |
| 177 | inline void caffe_gpu_memset(const size_t N, const int alpha, void* X) { |
| 178 | #ifndef CPU_ONLY |
| 179 | CUDA_CHECK(cudaMemset(X, alpha, N)); // NOLINT(caffe/alt_fn) |
| 180 | #else |
| 181 | NO_GPU; |
| 182 | #endif |
| 183 | } |
| 184 | |
| 185 | template <typename Dtype> |
| 186 | void caffe_gpu_add_scalar(const int N, const Dtype alpha, Dtype *X); |