1 #ifndef OPENPOSE_CORE_ARRAY_CPU_GPU_HPP
2 #define OPENPOSE_CORE_ARRAY_CPU_GPU_HPP
40 const std::vector<int>&
shape()
const;
41 int shape(
const int index)
const;
44 int count(
const int start_axis,
const int end_axis)
const;
45 int count(
const int start_axis)
const;
55 int offset(
const int n,
const int c = 0,
const int h = 0,
const int w = 0)
const;
61 T
data_at(
const int n,
const int c,
const int h,
const int w)
const;
62 T
diff_at(
const int n,
const int c,
const int h,
const int w)
const;
100 struct ImplArrayCpuGpu;
101 std::shared_ptr<ImplArrayCpuGpu> spImpl;
ArrayCpuGpu(const int num, const int channels, const int height, const int width)
void scale_diff(const T scale_factor)
void scale_data(const T scale_factor)
void Reshape(const std::vector< int > &shape)
const T * gpu_data() const
int shape(const int index) const
T diff_at(const int n, const int c, const int h, const int w) const
std::string shape_string() const
T data_at(const int n, const int c, const int h, const int w) const
void set_gpu_data(T *data)
ArrayCpuGpu(const void *caffeBlobTPtr)
int count(const int start_axis) const
const int * gpu_shape() const
const T * cpu_data() const
int LegacyShape(const int index) const
void Reshape(const int num, const int channels, const int height, const int width)
const T * gpu_diff() const
const T * cpu_diff() const
int count(const int start_axis, const int end_axis) const
ArrayCpuGpu(const Array< T > &array, const bool copyFromGpu)
void set_cpu_data(T *data)
int CanonicalAxisIndex(const int axis_index) const
int offset(const int n, const int c=0, const int h=0, const int w=0) const
const std::vector< int > & shape() const
#define DELETE_COPY(className)