Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
Reduction.h
Go to the documentation of this file.
1// ----------------------------------------------------------------------------
2// - Open3D: www.open3d.org -
3// ----------------------------------------------------------------------------
4// Copyright (c) 2018-2024 www.open3d.org
5// SPDX-License-Identifier: MIT
6// ----------------------------------------------------------------------------
7
8#pragma once
9
10#include <unordered_set>
11
13#include "open3d/core/Tensor.h"
16
17namespace open3d {
18namespace core {
19namespace kernel {
20
31
32static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
33 s_regular_reduce_ops = {
38};
39static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
40 s_arg_reduce_ops = {
43};
44static const std::unordered_set<ReductionOpCode, utility::hash_enum_class>
45 s_boolean_reduce_ops = {
48};
49
50void Reduction(const Tensor& src,
51 Tensor& dst,
52 const SizeVector& dims,
53 bool keepdim,
54 ReductionOpCode op_code);
55
56void ReductionCPU(const Tensor& src,
57 Tensor& dst,
58 const SizeVector& dims,
59 bool keepdim,
60 ReductionOpCode op_code);
61
62#ifdef BUILD_SYCL_MODULE
63void ReductionSYCL(const Tensor& src,
64 Tensor& dst,
65 const SizeVector& dims,
66 bool keepdim,
67 ReductionOpCode op_code);
68#endif
69
70#ifdef BUILD_CUDA_MODULE
71void ReductionCUDA(const Tensor& src,
72 Tensor& dst,
73 const SizeVector& dims,
74 bool keepdim,
75 ReductionOpCode op_code);
76#endif
77
78} // namespace kernel
79} // namespace core
80} // namespace open3d
Definition Arange.cpp:15
ReductionOpCode
Definition Reduction.h:21
@ ArgMin
Definition Reduction.h:26
@ Prod
Definition Reduction.h:23
@ ArgMax
Definition Reduction.h:27
@ Max
Definition Reduction.h:25
@ Min
Definition Reduction.h:24
@ Sum
Definition Reduction.h:22
@ All
Definition Reduction.h:28
@ Any
Definition Reduction.h:29
void ReductionSYCL(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition ReductionSYCL.cpp:210
void ReductionCPU(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition ReductionCPU.cpp:277
void Reduction(const Tensor &src, Tensor &dst, const SizeVector &dims, bool keepdim, ReductionOpCode op_code)
Definition Reduction.cpp:16
Definition AdvancedIndexing.cpp:15
Definition PinholeCameraIntrinsic.cpp:16