Open3D (C++ API)  0.19.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
UnaryEW.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 "open3d/core/Tensor.h"
11 #include "open3d/utility/Logging.h"
12 
13 namespace open3d {
14 namespace core {
15 namespace kernel {
16 
17 enum class UnaryEWOpCode {
18  Sqrt,
19  Sin,
20  Cos,
21  Neg,
22  Exp,
23  Abs,
24  IsNan,
25  IsInf,
26  IsFinite,
27  Floor,
28  Ceil,
29  Round,
30  Trunc,
32 };
33 
34 void UnaryEW(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
35 void UnaryEWCPU(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
36 
37 #ifdef BUILD_SYCL_MODULE
38 void UnaryEWSYCL(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
39 #endif
40 
41 #ifdef BUILD_CUDA_MODULE
42 void UnaryEWCUDA(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
43 #endif
44 
45 // Copy is separated from other unary ops since it supports cross-device copy
46 // and dtype casting.
47 void Copy(const Tensor& src, Tensor& dst);
48 
49 void CopyCPU(const Tensor& src, Tensor& dst);
50 
51 #ifdef BUILD_CUDA_MODULE
52 void CopyCUDA(const Tensor& src, Tensor& dst);
53 #endif
54 
55 #ifdef BUILD_SYCL_MODULE
56 void CopySYCL(const Tensor& src, Tensor& dst);
57 #endif
58 
59 } // namespace kernel
60 } // namespace core
61 } // namespace open3d
Definition: Tensor.h:32
UnaryEWOpCode
Definition: UnaryEW.h:17
void Copy(const Tensor &src, Tensor &dst)
Definition: UnaryEW.cpp:65
void CopySYCL(const Tensor &src, Tensor &dst)
Definition: UnaryEWSYCL.cpp:130
void CopyCPU(const Tensor &src, Tensor &dst)
Definition: UnaryEWCPU.cpp:173
void UnaryEWCPU(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEWCPU.cpp:216
void UnaryEW(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEW.cpp:18
void UnaryEWSYCL(const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
Definition: UnaryEWSYCL.cpp:198
Definition: PinholeCameraIntrinsic.cpp:16