Open3D (C++ API)  0.18.0
BinaryEW.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <unordered_set>
11 
12 #include "open3d/core/Tensor.h"
13 #include "open3d/utility/Helper.h"
14 #include "open3d/utility/Logging.h"
15 
16 namespace open3d {
17 namespace core {
18 namespace kernel {
19 
20 enum class BinaryEWOpCode {
21  Add,
22  Sub,
23  Mul,
24  Div,
25  Maximum,
26  Minimum,
27  LogicalAnd,
28  LogicalOr,
29  LogicalXor,
30  Gt,
31  Lt,
32  Ge,
33  Le,
34  Eq,
35  Ne,
36 };
37 
38 extern const std::unordered_set<BinaryEWOpCode, utility::hash_enum_class>
40 
41 void BinaryEW(const Tensor& lhs,
42  const Tensor& rhs,
43  Tensor& dst,
44  BinaryEWOpCode op_code);
45 
46 void BinaryEWCPU(const Tensor& lhs,
47  const Tensor& rhs,
48  Tensor& dst,
49  BinaryEWOpCode op_code);
50 
51 #ifdef BUILD_CUDA_MODULE
52 void BinaryEWCUDA(const Tensor& lhs,
53  const Tensor& rhs,
54  Tensor& dst,
55  BinaryEWOpCode op_code);
56 #endif
57 
58 } // namespace kernel
59 } // namespace core
60 } // namespace open3d
Definition: Tensor.h:32
void BinaryEW(const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
Definition: BinaryEW.cpp:29
BinaryEWOpCode
Definition: BinaryEW.h:20
const std::unordered_set< BinaryEWOpCode, utility::hash_enum_class > s_boolean_binary_ew_op_codes
Definition: BinaryEW.cpp:21
void BinaryEWCPU(const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)
Definition: BinaryEWCPU.cpp:153
Definition: PinholeCameraIntrinsic.cpp:16