83c01ddab533334452e756d0b2ff0ae57b470a0d
[platform/upstream/caffeonacl.git] / src / caffe / util / im2col.hpp
1 // Copyright 2013 Yangqing Jia
2
3 #ifndef _CAFFE_UTIL_IM2COL_HPP_
4 #define _CAFFE_UTIL_IM2COL_HPP_
5
6 namespace caffe {
7
8 template <typename Dtype>
9 void im2col_cpu(const Dtype* data_im, const int channels,
10     const int height, const int width, const int ksize, const int stride,
11     Dtype* data_col);
12
13 template <typename Dtype>
14 void col2im_cpu(const Dtype* data_col, const int channels,
15     const int height, const int width, const int psize, const int stride,
16     Dtype* data_im);
17
18 template <typename Dtype>
19 void im2col_gpu(const Dtype* data_im, const int channels,
20     const int height, const int width, const int ksize, const int stride,
21     Dtype* data_col);
22
23 template <typename Dtype>
24 void col2im_gpu(const Dtype* data_col, const int channels,
25     const int height, const int width, const int psize, const int stride,
26     Dtype* data_im);
27
28 }  // namespace caffe
29
30 #endif  // CAFFE_UTIL_IM2COL_HPP_