Open3D (C++ API)  0.17.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"
15
16namespace open3d {
17namespace core {
18namespace kernel {
19
20enum class BinaryEWOpCode {
21 Add,
22 Sub,
23 Mul,
24 Div,
25 Maximum,
26 Minimum,
30 Gt,
31 Lt,
32 Ge,
33 Le,
34 Eq,
35 Ne,
36};
37
38extern const std::unordered_set<BinaryEWOpCode, utility::hash_enum_class>
40
41void BinaryEW(const Tensor& lhs,
42 const Tensor& rhs,
43 Tensor& dst,
44 BinaryEWOpCode op_code);
45
46void BinaryEWCPU(const Tensor& lhs,
47 const Tensor& rhs,
48 Tensor& dst,
49 BinaryEWOpCode op_code);
50
51#ifdef BUILD_CUDA_MODULE
52void 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
Tensor Minimum(const Tensor &input, const Tensor &other)
Computes the element-wise minimum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:136
Tensor Maximum(const Tensor &input, const Tensor &other)
Computes the element-wise maximum of input and other. The tensors must have same data type and device...
Definition: TensorFunction.cpp:124
Definition: PinholeCameraIntrinsic.cpp:16