Open3D (C++ API)  0.12.0
Data Structures | Enumerations | Functions | Variables
open3d::core::kernel Namespace Reference

Data Structures

struct  ColoredVoxel16i
 
struct  ColoredVoxel32f
 
struct  Coord3i
 
struct  Coord3iHash
 
class  CPUArgReductionEngine
 
class  CPULauncher
 
class  CPUReductionEngine
 
class  NDArrayIndexer
 
class  TransformIndexer
 Helper class for converting coordinates/indices between 3D/3D, 3D/2D, 2D/3D. More...
 
struct  Voxel32f
 

Enumerations

enum  BinaryEWOpCode {
  BinaryEWOpCode::Add, BinaryEWOpCode::Sub, BinaryEWOpCode::Mul, BinaryEWOpCode::Div,
  BinaryEWOpCode::LogicalAnd, BinaryEWOpCode::LogicalOr, BinaryEWOpCode::LogicalXor, BinaryEWOpCode::Gt,
  BinaryEWOpCode::Lt, BinaryEWOpCode::Ge, BinaryEWOpCode::Le, BinaryEWOpCode::Eq,
  BinaryEWOpCode::Ne
}
 
enum  GeneralEWOpCode {
  GeneralEWOpCode::Unproject, GeneralEWOpCode::TSDFIntegrate, GeneralEWOpCode::TSDFTouch, GeneralEWOpCode::TSDFPointExtraction,
  GeneralEWOpCode::TSDFMeshExtraction, GeneralEWOpCode::RayCasting
}
 
enum  ReductionOpCode {
  ReductionOpCode::Sum, ReductionOpCode::Prod, ReductionOpCode::Min, ReductionOpCode::Max,
  ReductionOpCode::ArgMin, ReductionOpCode::ArgMax, ReductionOpCode::All, ReductionOpCode::Any
}
 
enum  UnaryEWOpCode {
  UnaryEWOpCode::Sqrt, UnaryEWOpCode::Sin, UnaryEWOpCode::Cos, UnaryEWOpCode::Neg,
  UnaryEWOpCode::Exp, UnaryEWOpCode::Abs, UnaryEWOpCode::LogicalNot
}
 

Functions

void BinaryEW (const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
 
void BinaryEWCPU (const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
 
void Add (const Tensor &lhs, const Tensor &rhs, Tensor &dst)
 
void Sub (const Tensor &lhs, const Tensor &rhs, Tensor &dst)
 
void Mul (const Tensor &lhs, const Tensor &rhs, Tensor &dst)
 
void Div (const Tensor &lhs, const Tensor &rhs, Tensor &dst)
 
void GeneralEW (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts, GeneralEWOpCode op_code)
 
void GeneralEWCPU (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts, GeneralEWOpCode op_code)
 
void CPUTSDFTouchKernel (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts)
 
template<typename voxel_t >
OPEN3D_DEVICE voxel_t * DeviceGetVoxelAt (int xo, int yo, int zo, int curr_block_idx, int resolution, const NDArrayIndexer &nb_block_masks_indexer, const NDArrayIndexer &nb_block_indices_indexer, const NDArrayIndexer &blocks_indexer)
 
template<typename voxel_t >
OPEN3D_DEVICE void DeviceGetNormalAt (int xo, int yo, int zo, int curr_block_idx, float *n, int resolution, float voxel_size, const NDArrayIndexer &nb_block_masks_indexer, const NDArrayIndexer &nb_block_indices_indexer, const NDArrayIndexer &blocks_indexer)
 
void CPUUnprojectKernel (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts)
 
void CPUTSDFIntegrateKernel (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts)
 
void CPUPointExtractionKernel (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts)
 
void CPUMeshExtractionKernel (const std::unordered_map< std::string, Tensor > &srcs, std::unordered_map< std::string, Tensor > &dsts)
 
void IndexGet (const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
 
void IndexSet (const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
 
void IndexGetCPU (const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
 
void IndexSetCPU (const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
 
void TestLinalgIntegration ()
 
Tensor NonZero (const Tensor &src)
 
Tensor NonZeroCPU (const Tensor &src)
 
int GetMaxThreads ()
 
bool InParallel ()
 
void Reduction (const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
 
void ReductionCPU (const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
 
void UnaryEW (const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
 
void Copy (const Tensor &src, Tensor &dst)
 
void UnaryEWCPU (const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
 
void CopyCPU (const Tensor &src, Tensor &dst)
 

Variables

const std::unordered_set< BinaryEWOpCode, utility::hash_enum_classs_boolean_binary_ew_op_codes
 
const int64_t MAX_RESOLUTION_DIMS = 4
 

Enumeration Type Documentation

◆ BinaryEWOpCode

Enumerator
Add 
Sub 
Mul 
Div 
LogicalAnd 
LogicalOr 
LogicalXor 
Gt 
Lt 
Ge 
Le 
Eq 
Ne 

◆ GeneralEWOpCode

Enumerator
Unproject 
TSDFIntegrate 
TSDFTouch 
TSDFPointExtraction 
TSDFMeshExtraction 
RayCasting 

◆ ReductionOpCode

Enumerator
Sum 
Prod 
Min 
Max 
ArgMin 
ArgMax 
All 
Any 

◆ UnaryEWOpCode

Enumerator
Sqrt 
Sin 
Cos 
Neg 
Exp 
Abs 
LogicalNot 

Function Documentation

◆ Add()

void open3d::core::kernel::Add ( const Tensor lhs,
const Tensor rhs,
Tensor dst 
)
inline

◆ BinaryEW()

void open3d::core::kernel::BinaryEW ( const Tensor lhs,
const Tensor rhs,
Tensor dst,
BinaryEWOpCode  op_code 
)

◆ BinaryEWCPU()

void open3d::core::kernel::BinaryEWCPU ( const Tensor lhs,
const Tensor rhs,
Tensor dst,
BinaryEWOpCode  op_code 
)

◆ Copy()

void open3d::core::kernel::Copy ( const Tensor src,
Tensor dst 
)

◆ CopyCPU()

void open3d::core::kernel::CopyCPU ( const Tensor src,
Tensor dst 
)

◆ CPUMeshExtractionKernel()

void open3d::core::kernel::CPUMeshExtractionKernel ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts 
)

◆ CPUPointExtractionKernel()

void open3d::core::kernel::CPUPointExtractionKernel ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts 
)

Coordinate transform

◆ CPUTSDFIntegrateKernel()

void open3d::core::kernel::CPUTSDFIntegrateKernel ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts 
)

Coordinate transform

◆ CPUTSDFTouchKernel()

void open3d::core::kernel::CPUTSDFTouchKernel ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts 
)

◆ CPUUnprojectKernel()

void open3d::core::kernel::CPUUnprojectKernel ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts 
)

◆ DeviceGetNormalAt()

template<typename voxel_t >
OPEN3D_DEVICE void open3d::core::kernel::DeviceGetNormalAt ( int  xo,
int  yo,
int  zo,
int  curr_block_idx,
float *  n,
int  resolution,
float  voxel_size,
const NDArrayIndexer nb_block_masks_indexer,
const NDArrayIndexer nb_block_indices_indexer,
const NDArrayIndexer blocks_indexer 
)
inline

◆ DeviceGetVoxelAt()

template<typename voxel_t >
OPEN3D_DEVICE voxel_t* open3d::core::kernel::DeviceGetVoxelAt ( int  xo,
int  yo,
int  zo,
int  curr_block_idx,
int  resolution,
const NDArrayIndexer nb_block_masks_indexer,
const NDArrayIndexer nb_block_indices_indexer,
const NDArrayIndexer blocks_indexer 
)
inline

◆ Div()

void open3d::core::kernel::Div ( const Tensor lhs,
const Tensor rhs,
Tensor dst 
)
inline

◆ GeneralEW()

void open3d::core::kernel::GeneralEW ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts,
GeneralEWOpCode  op_code 
)

◆ GeneralEWCPU()

void open3d::core::kernel::GeneralEWCPU ( const std::unordered_map< std::string, Tensor > &  srcs,
std::unordered_map< std::string, Tensor > &  dsts,
GeneralEWOpCode  op_code 
)

◆ GetMaxThreads()

int open3d::core::kernel::GetMaxThreads ( )
inline

◆ IndexGet()

void open3d::core::kernel::IndexGet ( const Tensor src,
Tensor dst,
const std::vector< Tensor > &  index_tensors,
const SizeVector indexed_shape,
const SizeVector indexed_strides 
)

◆ IndexGetCPU()

void open3d::core::kernel::IndexGetCPU ( const Tensor src,
Tensor dst,
const std::vector< Tensor > &  index_tensors,
const SizeVector indexed_shape,
const SizeVector indexed_strides 
)

◆ IndexSet()

void open3d::core::kernel::IndexSet ( const Tensor src,
Tensor dst,
const std::vector< Tensor > &  index_tensors,
const SizeVector indexed_shape,
const SizeVector indexed_strides 
)

◆ IndexSetCPU()

void open3d::core::kernel::IndexSetCPU ( const Tensor src,
Tensor dst,
const std::vector< Tensor > &  index_tensors,
const SizeVector indexed_shape,
const SizeVector indexed_strides 
)

◆ InParallel()

bool open3d::core::kernel::InParallel ( )
inline

◆ Mul()

void open3d::core::kernel::Mul ( const Tensor lhs,
const Tensor rhs,
Tensor dst 
)
inline

◆ NonZero()

Tensor open3d::core::kernel::NonZero ( const Tensor src)

◆ NonZeroCPU()

Tensor open3d::core::kernel::NonZeroCPU ( const Tensor src)

◆ Reduction()

void open3d::core::kernel::Reduction ( const Tensor src,
Tensor dst,
const SizeVector dims,
bool  keepdim,
ReductionOpCode  op_code 
)

◆ ReductionCPU()

void open3d::core::kernel::ReductionCPU ( const Tensor src,
Tensor dst,
const SizeVector dims,
bool  keepdim,
ReductionOpCode  op_code 
)

◆ Sub()

void open3d::core::kernel::Sub ( const Tensor lhs,
const Tensor rhs,
Tensor dst 
)
inline

◆ TestLinalgIntegration()

void open3d::core::kernel::TestLinalgIntegration ( )

◆ UnaryEW()

void open3d::core::kernel::UnaryEW ( const Tensor src,
Tensor dst,
UnaryEWOpCode  op_code 
)

◆ UnaryEWCPU()

void open3d::core::kernel::UnaryEWCPU ( const Tensor src,
Tensor dst,
UnaryEWOpCode  op_code 
)

Variable Documentation

◆ MAX_RESOLUTION_DIMS

const int64_t open3d::core::kernel::MAX_RESOLUTION_DIMS = 4

Convert between ND coordinates and their corresponding linear offsets. Input ndarray tensor must be contiguous. Internal shape conversions: 1D: index (x), [channel (c)] 2D: height (y), weight (x), [channel (c)] 3D: depth (z), height (y), width (x), [channel (c)] 4D: time (t), depth (z), height (y), width (x), [channel (c)] External indexing order: 1D: x 2D: x, y 3D: x, y, z 4D: x, y, z, t

◆ s_boolean_binary_ew_op_codes

const std::unordered_set< BinaryEWOpCode, utility::hash_enum_class > open3d::core::kernel::s_boolean_binary_ew_op_codes
Initial value:
{
BinaryEWOpCode::LogicalAnd, BinaryEWOpCode::LogicalOr,
BinaryEWOpCode::LogicalXor, BinaryEWOpCode::Gt,
BinaryEWOpCode::Lt, BinaryEWOpCode::Ge,
BinaryEWOpCode::Le, BinaryEWOpCode::Eq,
BinaryEWOpCode::Ne,
}