ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
colmap::mvs::GpuMat< T > Class Template Reference

#include <gpu_mat.h>

Inheritance diagram for colmap::mvs::GpuMat< T >:

Public Member Functions

 GpuMat (const size_t width, const size_t height, const size_t depth=1)
 
 ~GpuMat ()
 
__host__ __device__ const T * GetPtr () const
 
__host__ __device__ T * GetPtr ()
 
__host__ __device__ size_t GetPitch () const
 
__host__ __device__ size_t GetWidth () const
 
__host__ __device__ size_t GetHeight () const
 
__host__ __device__ size_t GetDepth () const
 
__device__ T Get (const size_t row, const size_t col, const size_t slice=0) const
 
__device__ void GetSlice (const size_t row, const size_t col, T *values) const
 
__device__ T & GetRef (const size_t row, const size_t col)
 
__device__ T & GetRef (const size_t row, const size_t col, const size_t slice)
 
__device__ void Set (const size_t row, const size_t col, const T value)
 
__device__ void Set (const size_t row, const size_t col, const size_t slice, const T value)
 
__device__ void SetSlice (const size_t row, const size_t col, const T *values)
 
void FillWithScalar (const T value)
 
void FillWithVector (const T *values)
 
void FillWithRandomNumbers (const T min_value, const T max_value, GpuMat< curandState > random_state)
 
void CopyToDevice (const T *data, const size_t pitch)
 
void CopyToHost (T *data, const size_t pitch) const
 
Mat< T > CopyToMat () const
 
void Transpose (GpuMat< T > *output)
 
void FlipHorizontal (GpuMat< T > *output)
 
void Rotate (GpuMat< T > *output)
 
void Read (const std::string &path)
 
void Write (const std::string &path)
 
void Write (const std::string &path, const size_t slice)
 

Protected Member Functions

void ComputeCudaConfig ()
 

Protected Attributes

std::shared_ptr< T > array_
 
T * array_ptr_
 
size_t pitch_
 
size_t width_
 
size_t height_
 
size_t depth_
 
dim3 blockSize_
 
dim3 gridSize_
 

Static Protected Attributes

static const size_t kBlockDimX = 32
 
static const size_t kBlockDimY = 16
 

Detailed Description

template<typename T>
class colmap::mvs::GpuMat< T >

Definition at line 30 of file gpu_mat.h.

Constructor & Destructor Documentation

◆ GpuMat()

template<typename T >
colmap::mvs::GpuMat< T >::GpuMat ( const size_t  width,
const size_t  height,
const size_t  depth = 1 
)

◆ ~GpuMat()

template<typename T >
colmap::mvs::GpuMat< T >::~GpuMat ( )

Member Function Documentation

◆ ComputeCudaConfig()

template<typename T >
void colmap::mvs::GpuMat< T >::ComputeCudaConfig ( )
protected

◆ CopyToDevice()

template<typename T >
void colmap::mvs::GpuMat< T >::CopyToDevice ( const T *  data,
const size_t  pitch 
)

◆ CopyToHost()

template<typename T >
void colmap::mvs::GpuMat< T >::CopyToHost ( T *  data,
const size_t  pitch 
) const

◆ CopyToMat()

template<typename T >
Mat<T> colmap::mvs::GpuMat< T >::CopyToMat ( ) const

◆ FillWithRandomNumbers()

template<typename T >
void colmap::mvs::GpuMat< T >::FillWithRandomNumbers ( const T  min_value,
const T  max_value,
GpuMat< curandState >  random_state 
)

◆ FillWithScalar()

template<typename T >
void colmap::mvs::GpuMat< T >::FillWithScalar ( const T  value)

◆ FillWithVector()

template<typename T >
void colmap::mvs::GpuMat< T >::FillWithVector ( const T *  values)

◆ FlipHorizontal()

template<typename T >
void colmap::mvs::GpuMat< T >::FlipHorizontal ( GpuMat< T > *  output)

◆ Get()

template<typename T >
__device__ T colmap::mvs::GpuMat< T >::Get ( const size_t  row,
const size_t  col,
const size_t  slice = 0 
) const

◆ GetDepth()

template<typename T >
__host__ __device__ size_t colmap::mvs::GpuMat< T >::GetDepth ( ) const

◆ GetHeight()

template<typename T >
__host__ __device__ size_t colmap::mvs::GpuMat< T >::GetHeight ( ) const

◆ GetPitch()

template<typename T >
__host__ __device__ size_t colmap::mvs::GpuMat< T >::GetPitch ( ) const

◆ GetPtr() [1/2]

template<typename T >
__host__ __device__ T* colmap::mvs::GpuMat< T >::GetPtr ( )

◆ GetPtr() [2/2]

template<typename T >
__host__ __device__ const T* colmap::mvs::GpuMat< T >::GetPtr ( ) const

◆ GetRef() [1/2]

template<typename T >
__device__ T& colmap::mvs::GpuMat< T >::GetRef ( const size_t  row,
const size_t  col 
)

◆ GetRef() [2/2]

template<typename T >
__device__ T& colmap::mvs::GpuMat< T >::GetRef ( const size_t  row,
const size_t  col,
const size_t  slice 
)

◆ GetSlice()

template<typename T >
__device__ void colmap::mvs::GpuMat< T >::GetSlice ( const size_t  row,
const size_t  col,
T *  values 
) const

◆ GetWidth()

template<typename T >
__host__ __device__ size_t colmap::mvs::GpuMat< T >::GetWidth ( ) const

◆ Read()

template<typename T >
void colmap::mvs::GpuMat< T >::Read ( const std::string &  path)

◆ Rotate()

template<typename T >
void colmap::mvs::GpuMat< T >::Rotate ( GpuMat< T > *  output)

◆ Set() [1/2]

template<typename T >
__device__ void colmap::mvs::GpuMat< T >::Set ( const size_t  row,
const size_t  col,
const size_t  slice,
const T  value 
)

◆ Set() [2/2]

template<typename T >
__device__ void colmap::mvs::GpuMat< T >::Set ( const size_t  row,
const size_t  col,
const T  value 
)

◆ SetSlice()

template<typename T >
__device__ void colmap::mvs::GpuMat< T >::SetSlice ( const size_t  row,
const size_t  col,
const T *  values 
)

◆ Transpose()

template<typename T >
void colmap::mvs::GpuMat< T >::Transpose ( GpuMat< T > *  output)

◆ Write() [1/2]

template<typename T >
void colmap::mvs::GpuMat< T >::Write ( const std::string &  path)

◆ Write() [2/2]

template<typename T >
void colmap::mvs::GpuMat< T >::Write ( const std::string &  path,
const size_t  slice 
)

Member Data Documentation

◆ array_

template<typename T >
std::shared_ptr<T> colmap::mvs::GpuMat< T >::array_
protected

Definition at line 93 of file gpu_mat.h.

◆ array_ptr_

template<typename T >
T* colmap::mvs::GpuMat< T >::array_ptr_
protected

Definition at line 94 of file gpu_mat.h.

◆ blockSize_

template<typename T >
dim3 colmap::mvs::GpuMat< T >::blockSize_
protected

Definition at line 101 of file gpu_mat.h.

◆ depth_

template<typename T >
size_t colmap::mvs::GpuMat< T >::depth_
protected

Definition at line 99 of file gpu_mat.h.

◆ gridSize_

template<typename T >
dim3 colmap::mvs::GpuMat< T >::gridSize_
protected

Definition at line 102 of file gpu_mat.h.

◆ height_

template<typename T >
size_t colmap::mvs::GpuMat< T >::height_
protected

Definition at line 98 of file gpu_mat.h.

◆ kBlockDimX

template<typename T >
const size_t colmap::mvs::GpuMat< T >::kBlockDimX = 32
staticprotected

Definition at line 90 of file gpu_mat.h.

◆ kBlockDimY

template<typename T >
const size_t colmap::mvs::GpuMat< T >::kBlockDimY = 16
staticprotected

Definition at line 91 of file gpu_mat.h.

◆ pitch_

template<typename T >
size_t colmap::mvs::GpuMat< T >::pitch_
protected

Definition at line 96 of file gpu_mat.h.

◆ width_

template<typename T >
size_t colmap::mvs::GpuMat< T >::width_
protected

Definition at line 97 of file gpu_mat.h.


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