 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
38 #ifdef BUILD_SYCL_MODULE
42 #ifdef BUILD_CUDA_MODULE
52 #ifdef BUILD_CUDA_MODULE
56 #ifdef BUILD_SYCL_MODULE
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
Dtype GetDtype() const
Definition: Tensor.h:1164
Tensor Sqrt() const
Element-wise square root of a tensor, returns a new tensor.
Definition: Tensor.cpp:1296
CLOUDVIEWER_HOST_DEVICE Pair< First, Second > make_pair(const First &_first, const Second &_second)
Definition: SlabTraits.h:49
SizeVector GetShape() const
Definition: Tensor.h:1127
static uint8_t CPUAllReductionKernel(uint8_t a, uint8_t b)
Definition: ReductionCPU.cpp:42
Tensor Ceil() const
Element-wise ceil value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1417
static std::function< Tensor(const Tensor &, const Tensor &)> MakeOperation(BinaryOpCode op)
Definition: BinaryEW.cpp:38
UnaryEWOpCode
Definition: UnaryEW.h:18
int offset
Definition: FileIOFactory.cpp:135
void ReductionSYCL(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition: ReductionSYCL.cpp:211
void UnaryEWSYCL(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEWSYCL.cpp:199
#define ENUM_BM_TENSOR(FN, OP)
Definition: UnaryEW.cpp:153
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_regular_reduce_ops
Definition: Reduction.h:34
Definition: ReductionCPU.cpp:182
Definition: ReductionCPU.cpp:70
CPUReductionEngine(const CPUReductionEngine &)=delete
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_arg_reduce_ops
Definition: Reduction.h:41
static void LaunchArgReductionKernelTwoPass(const Indexer &indexer, func_t reduce_func, scalar_t identity)
Definition: ReductionCPU.cpp:232
Tensor LogicalNot() const
Definition: Tensor.cpp:1442
static std::pair< int64_t, scalar_t > CPUArgMaxReductionKernel(int64_t a_idx, scalar_t a, int64_t b_idx, scalar_t b)
Definition: ReductionCPU.cpp:61
void Run(const func_t &reduce_func, scalar_t identity)
Definition: ReductionCPU.cpp:189
std::string ToString() const
Returns string representation of device, e.g. "CPU:0", "CUDA:0".
Definition: Device.cpp:89
core::Tensor result
Definition: VtkUtils.cpp:76
sycl::queue queue
Default queue for this device.
Definition: SYCLContext.h:32
bool IsCUDA() const
Returns true iff device type is CUDA.
Definition: Device.h:49
void CopyCPU(const Tensor &src, Tensor &dst)
Definition: UnaryEWCPU.cpp:174
void Copy(const Tensor &src, Tensor &dst)
Definition: UnaryEW.cpp:66
static scalar_t CPUProdReductionKernel(scalar_t a, scalar_t b)
Definition: ReductionCPU.cpp:28
int size
Definition: FileIOFactory.cpp:130
ReductionOpCode
Definition: Reduction.h:22
bool IsSYCL() const
Returns true iff device type is SYCL GPU.
Definition: Device.h:52
int EstimateMaxThreads()
Estimate the maximum number of threads to be used in a parallel region.
Definition: Parallel.cpp:31
const double * e
Definition: essential_matrix_poly.h:10
int64_t NumOutputElements() const
Returns the number of output elements.
Definition: Indexer.cpp:414
CPUReductionEngine & operator=(const CPUReductionEngine &)=delete
#define ENUM_BM_TENSOR_FLOAT(FN, OP)
Definition: UnaryEW.cpp:161
Tensor IsNan() const
Definition: Tensor.cpp:1362
Tensor Exp() const
Element-wise exponential of a tensor, returning a new tensor.
Definition: Tensor.cpp:1340
void UnaryEW(benchmark::State &state, int size, UnaryOpCode op_code, const Dtype &dtype, const Device &device)
Definition: UnaryEW.cpp:89
const Dtype Bool
Definition: Dtype.cpp:52
std::string ToString() const
Definition: Dtype.h:65
void ReductionCPU(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition: ReductionCPU.cpp:278
const Dtype Float64
Definition: Dtype.cpp:43
a[190]
Definition: essential_matrix_poly.h:19
Device GetDevice() const override
Definition: Tensor.cpp:1435
CPUArgReductionEngine(const CPUArgReductionEngine &)=delete
CPUArgReductionEngine(const Indexer &indexer)
Definition: ReductionCPU.cpp:186
const Dtype Float32
Definition: Dtype.cpp:42
SYCLDevice GetDeviceProperties(const Device &device)
Get SYCL device properties given an CloudViewer device.
Definition: SYCLContext.h:62
Definition: SizeVector.h:70
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_boolean_reduce_ops
Definition: Reduction.h:46
Indexer indexer
Definition: BinaryEWSYCL.cpp:30
void UnaryEWCPU(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEWCPU.cpp:217
core::Tensor Rand(const core::SizeVector &shape, size_t seed, const std::pair< core::Scalar, core::Scalar > &range, core::Dtype dtype, const core::Device &device)
Returns a Tensor with random values within the range range .
Definition: Rand.cpp:23
#define LogError(...)
Definition: Logging.h:60
static scalar_t CPUMinReductionKernel(scalar_t a, scalar_t b)
Definition: ReductionCPU.cpp:33
#define DISPATCH_DTYPE_TO_TEMPLATE(DTYPE,...)
Definition: Dispatch.h:31
CLOUDVIEWER_HOST_DEVICE char * GetOutputPtr(int64_t workload_idx) const
Definition: Indexer.h:438
static scalar_t CPUSumReductionKernel(scalar_t a, scalar_t b)
Definition: ReductionCPU.cpp:23
static SYCLContext & GetInstance()
Get singleton instance.
Definition: SYCLContext.cpp:25
bool CanBeBrocastedToShape(const SizeVector &src_shape, const SizeVector &dst_shape)
Returns true if src_shape can be brocasted to dst_shape.
Definition: ShapeUtil.cpp:90
CLOUDVIEWER_HOST_DEVICE char * GetInputPtr(int64_t input_idx, int64_t workload_idx) const
Definition: Indexer.h:406
bool IsCPU() const
Returns true iff device type is CPU.
Definition: Device.h:46
Tensor Round() const
Element-wise round value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1423
UnaryOpCode
Definition: UnaryEW.cpp:23
Tensor Sin() const
Element-wise sine of a tensor, returning a new tensor.
Definition: Tensor.cpp:1307
Tensor IsFinite() const
Definition: Tensor.cpp:1382
static scalar_t CPUMaxReductionKernel(scalar_t a, scalar_t b)
Definition: ReductionCPU.cpp:38
#define ENUM_BM_TENSOR_WTIH_BOOL(FN, OP)
Definition: UnaryEW.cpp:170
int64_t NumWorkloads() const
Definition: Indexer.cpp:406
Tensor Trunc() const
Element-wise trunc value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1429
Tensor Abs() const
Element-wise absolute value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1351
void CopySYCL(const Tensor &src, Tensor &dst)
Definition: UnaryEWSYCL.cpp:131
Tensor Cos() const
Element-wise cosine of a tensor, returning a new tensor.
Definition: Tensor.cpp:1318
void Synchronize()
Definition: CUDAUtils.cpp:59
Definition: Indexer.h:262
void UnaryEW(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEW.cpp:19
const Dtype Int64
Definition: Dtype.cpp:47
static void LaunchArgReductionParallelDim(const Indexer &indexer, func_t reduce_func, scalar_t identity)
Definition: ReductionCPU.cpp:203
Tensor Neg() const
Element-wise negation of a tensor, returning a new tensor.
Definition: Tensor.cpp:1329
void Run(const func_t &reduce_func, scalar_t identity)
Definition: ReductionCPU.cpp:77
CPUArgReductionEngine & operator=(const CPUArgReductionEngine &)=delete
bool InParallel()
Returns true if in an parallel section.
Definition: Parallel.cpp:48
CPUReductionEngine(const Indexer &indexer)
Definition: ReductionCPU.cpp:74
Tensor IsInf() const
Definition: Tensor.cpp:1372
static std::pair< int64_t, scalar_t > CPUArgMinReductionKernel(int64_t a_idx, scalar_t a, int64_t b_idx, scalar_t b)
Definition: ReductionCPU.cpp:51
Tensor Floor() const
Element-wise floor value of a tensor, returning a new tensor.
Definition: Tensor.cpp:1411
static uint8_t CPUAnyReductionKernel(uint8_t a, uint8_t b)
Definition: ReductionCPU.cpp:46