 |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Go to the documentation of this file.
13 #include <unordered_set>
33 static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
40 static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
45 static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
63 #ifdef BUILD_SYCL_MODULE
71 #ifdef BUILD_CUDA_MODULE
72 void ReductionCUDA(
const Tensor& src,
Generic file read and write utility for python interface.
Definition: CloudViewerConfig.cpp:12
Dtype GetDtype() const
Definition: Tensor.h:1164
SizeVector ReductionShape(const SizeVector &src_shape, const SizeVector &dims, bool keepdim)
Returns the shape after reduction.
Definition: ShapeUtil.cpp:99
SizeVector GetShape() const
Definition: Tensor.h:1127
void ReductionSYCL(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition: ReductionSYCL.cpp:211
bool IsCUDA() const
Definition: Device.h:99
static constexpr int64_t MAX_DIMS
Definition: Indexer.h:38
Tensor Reshape(const SizeVector &dst_shape) const
Definition: Tensor.cpp:671
void Reduction(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition: Reduction.cpp:16
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_regular_reduce_ops
Definition: Reduction.h:34
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_arg_reduce_ops
Definition: Reduction.h:41
Tensor NonZeroSYCL(const Tensor &src)
Definition: NonZeroSYCL.cpp:22
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
int64_t NumDims() const
Definition: Tensor.h:1172
ReductionOpCode
Definition: Reduction.h:22
static Tensor Arange(const Scalar start, const Scalar stop, const Scalar step=1, const Dtype dtype=core::Int64, const Device &device=core::Device("CPU:0"))
Create a 1D tensor with evenly spaced values in the given interval.
Definition: Tensor.cpp:436
std::string ToString() const
Definition: SizeVector.cpp:132
void ReductionCPU(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition: ReductionCPU.cpp:278
Device GetDevice() const override
Definition: Tensor.cpp:1435
BENCHMARK_CAPTURE(BinaryEW, Add__CPU_Int8__100, 100, BinaryOpCode::Add, Int8, Device("CPU:0")) -> Unit(benchmark::kMillisecond)
#define DISPATCH_DTYPE_TO_TEMPLATE_WITH_BOOL(DTYPE,...)
Definition: Dispatch.h:68
Definition: Indexer.h:222
Definition: SizeVector.h:70
static const std::unordered_set< ReductionOpCode, utility::hash_enum_class > s_boolean_reduce_ops
Definition: Reduction.h:46
#define LogError(...)
Definition: Logging.h:60
static SYCLContext & GetInstance()
Get singleton instance.
Definition: SYCLContext.cpp:25
bool IsCPU() const
Definition: Device.h:95
int64_t NumElements() const
Definition: Tensor.h:1170
void Reduction(benchmark::State &state, const Device &device)
Definition: Reduction.cpp:21
Tensor Sum(const SizeVector &dims, bool keepdim=false) const
Definition: Tensor.cpp:1240
bool IsSYCL() const
Definition: Device.h:103
Tensor AsRvalue()
Definition: Tensor.h:558
#define CLOUDVIEWER_ASSERT(...)
Definition: Macro.h:51
Tensor NonZeroCPU(const Tensor &src)
Definition: NonZeroCPU.cpp:20
void Synchronize()
Definition: CUDAUtils.cpp:59
sycl::queue GetDefaultQueue(const Device &device)
Get the default SYCL queue given an CloudViewer device.
Definition: SYCLContext.cpp:43
static double distance(T *pot1, T *pot2)
Definition: utils.h:111
const Dtype Int64
Definition: Dtype.cpp:47
T * GetDataPtr()
Definition: Tensor.h:1144