1 #ifndef _CAFFE_UTIL__IM2COL_HPP_
2 #define _CAFFE_UTIL_IM2COL_HPP_
4 namespace caffe {
6 template <typename Dtype>
7 void im2col_cpu(const Dtype* data_im, const int channels,
8 const int height, const int width, const int ksize, const int stride,
9 Dtype* data_col);
11 template <typename Dtype>
12 void col2im_cpu(const Dtype* data_col, const int channels,
13 const int height, const int width, const int psize, const int stride,
14 Dtype* data_im);
16 template <typename Dtype>
17 void im2col_gpu(const Dtype* data_im, const int channels,
18 const int height, const int width, const int ksize, const int stride,
19 Dtype* data_col);
21 template <typename Dtype>
22 void col2im_gpu(const Dtype* data_col, const int channels,
23 const int height, const int width, const int psize, const int stride,
24 Dtype* data_im);
26 } // namespace caffe
28 #endif // CAFFE_UTIL_IM2COL_HPP_