OpenPose  1.7.0
The first real-time multi-person system to jointly detect human body, hand, facial, and foot keypoints
op::ArrayCpuGpu< T > Class Template Reference

#include <arrayCpuGpu.hpp>

Public Member Functions

 ArrayCpuGpu ()
 
 ArrayCpuGpu (const void *caffeBlobTPtr)
 
 ArrayCpuGpu (const Array< T > &array, const bool copyFromGpu)
 
 ArrayCpuGpu (const int num, const int channels, const int height, const int width)
 
void Reshape (const int num, const int channels, const int height, const int width)
 
void Reshape (const std::vector< int > &shape)
 
std::string shape_string () const
 
const std::vector< int > & shape () const
 
int shape (const int index) const
 
int num_axes () const
 
int count () const
 
int count (const int start_axis, const int end_axis) const
 
int count (const int start_axis) const
 
int CanonicalAxisIndex (const int axis_index) const
 
int num () const
 
int channels () const
 
int height () const
 
int width () const
 
int LegacyShape (const int index) const
 
int offset (const int n, const int c=0, const int h=0, const int w=0) const
 
data_at (const int n, const int c, const int h, const int w) const
 
diff_at (const int n, const int c, const int h, const int w) const
 
const T * cpu_data () const
 
void set_cpu_data (T *data)
 
const int * gpu_shape () const
 
const T * gpu_data () const
 
void set_gpu_data (T *data)
 
const T * cpu_diff () const
 
const T * gpu_diff () const
 
T * mutable_cpu_data ()
 
T * mutable_gpu_data ()
 
T * mutable_cpu_diff ()
 
T * mutable_gpu_diff ()
 
void Update ()
 
asum_data () const
 
asum_diff () const
 
sumsq_data () const
 
sumsq_diff () const
 
void scale_data (const T scale_factor)
 
void scale_diff (const T scale_factor)
 

Detailed Description

template<typename T>
class op::ArrayCpuGpu< T >

ArrayCpuGpu<T>: Bind of caffe::Blob<T> to avoid Caffe as dependency in the headers.

Definition at line 15 of file arrayCpuGpu.hpp.

Constructor & Destructor Documentation

◆ ArrayCpuGpu() [1/4]

template<typename T >
op::ArrayCpuGpu< T >::ArrayCpuGpu ( )

◆ ArrayCpuGpu() [2/4]

template<typename T >
op::ArrayCpuGpu< T >::ArrayCpuGpu ( const void *  caffeBlobTPtr)
explicit
Parameters
caffeBlobTPtrshould be a caffe::Blob<T>* element or it will provoke a core dumped. Done to avoid explicitly exposing 3rdparty libraries on the headers.

◆ ArrayCpuGpu() [3/4]

template<typename T >
op::ArrayCpuGpu< T >::ArrayCpuGpu ( const Array< T > &  array,
const bool  copyFromGpu 
)
explicit

Create an ArrayCpuGpu from the data in the Array element (it will automatically copy that data).

Parameters
arrayArray<T> where the data to be copied is.
copyFromGpuIf false (default), it will copy the data to the CPU. If true, it will copy it to the GPU memory (using CUDA copy function).

◆ ArrayCpuGpu() [4/4]

template<typename T >
op::ArrayCpuGpu< T >::ArrayCpuGpu ( const int  num,
const int  channels,
const int  height,
const int  width 
)
explicit

Member Function Documentation

◆ asum_data()

template<typename T >
T op::ArrayCpuGpu< T >::asum_data ( ) const

◆ asum_diff()

template<typename T >
T op::ArrayCpuGpu< T >::asum_diff ( ) const

◆ CanonicalAxisIndex()

template<typename T >
int op::ArrayCpuGpu< T >::CanonicalAxisIndex ( const int  axis_index) const

◆ channels()

template<typename T >
int op::ArrayCpuGpu< T >::channels ( ) const

◆ count() [1/3]

template<typename T >
int op::ArrayCpuGpu< T >::count ( ) const

◆ count() [2/3]

template<typename T >
int op::ArrayCpuGpu< T >::count ( const int  start_axis) const

◆ count() [3/3]

template<typename T >
int op::ArrayCpuGpu< T >::count ( const int  start_axis,
const int  end_axis 
) const

◆ cpu_data()

template<typename T >
const T* op::ArrayCpuGpu< T >::cpu_data ( ) const

◆ cpu_diff()

template<typename T >
const T* op::ArrayCpuGpu< T >::cpu_diff ( ) const

◆ data_at()

template<typename T >
T op::ArrayCpuGpu< T >::data_at ( const int  n,
const int  c,
const int  h,
const int  w 
) const

◆ diff_at()

template<typename T >
T op::ArrayCpuGpu< T >::diff_at ( const int  n,
const int  c,
const int  h,
const int  w 
) const

◆ gpu_data()

template<typename T >
const T* op::ArrayCpuGpu< T >::gpu_data ( ) const

◆ gpu_diff()

template<typename T >
const T* op::ArrayCpuGpu< T >::gpu_diff ( ) const

◆ gpu_shape()

template<typename T >
const int* op::ArrayCpuGpu< T >::gpu_shape ( ) const

◆ height()

template<typename T >
int op::ArrayCpuGpu< T >::height ( ) const

◆ LegacyShape()

template<typename T >
int op::ArrayCpuGpu< T >::LegacyShape ( const int  index) const

◆ mutable_cpu_data()

template<typename T >
T* op::ArrayCpuGpu< T >::mutable_cpu_data ( )

◆ mutable_cpu_diff()

template<typename T >
T* op::ArrayCpuGpu< T >::mutable_cpu_diff ( )

◆ mutable_gpu_data()

template<typename T >
T* op::ArrayCpuGpu< T >::mutable_gpu_data ( )

◆ mutable_gpu_diff()

template<typename T >
T* op::ArrayCpuGpu< T >::mutable_gpu_diff ( )

◆ num()

template<typename T >
int op::ArrayCpuGpu< T >::num ( ) const

◆ num_axes()

template<typename T >
int op::ArrayCpuGpu< T >::num_axes ( ) const

◆ offset()

template<typename T >
int op::ArrayCpuGpu< T >::offset ( const int  n,
const int  c = 0,
const int  h = 0,
const int  w = 0 
) const

◆ Reshape() [1/2]

template<typename T >
void op::ArrayCpuGpu< T >::Reshape ( const int  num,
const int  channels,
const int  height,
const int  width 
)

◆ Reshape() [2/2]

template<typename T >
void op::ArrayCpuGpu< T >::Reshape ( const std::vector< int > &  shape)

◆ scale_data()

template<typename T >
void op::ArrayCpuGpu< T >::scale_data ( const T  scale_factor)

◆ scale_diff()

template<typename T >
void op::ArrayCpuGpu< T >::scale_diff ( const T  scale_factor)

◆ set_cpu_data()

template<typename T >
void op::ArrayCpuGpu< T >::set_cpu_data ( T *  data)

◆ set_gpu_data()

template<typename T >
void op::ArrayCpuGpu< T >::set_gpu_data ( T *  data)

◆ shape() [1/2]

template<typename T >
const std::vector<int>& op::ArrayCpuGpu< T >::shape ( ) const

◆ shape() [2/2]

template<typename T >
int op::ArrayCpuGpu< T >::shape ( const int  index) const

◆ shape_string()

template<typename T >
std::string op::ArrayCpuGpu< T >::shape_string ( ) const

◆ sumsq_data()

template<typename T >
T op::ArrayCpuGpu< T >::sumsq_data ( ) const

◆ sumsq_diff()

template<typename T >
T op::ArrayCpuGpu< T >::sumsq_diff ( ) const

◆ Update()

template<typename T >
void op::ArrayCpuGpu< T >::Update ( )

◆ width()

template<typename T >
int op::ArrayCpuGpu< T >::width ( ) const

The documentation for this class was generated from the following file: