Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
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"
12
13namespace open3d {
14namespace core {
15namespace kernel {
16
17enum class UnaryEWOpCode {
18 Sqrt,
19 Sin,
20 Cos,
21 Neg,
22 Exp,
23 Abs,
24 IsNan,
25 IsInf,
27 Floor,
28 Ceil,
29 Round,
30 Trunc,
32};
33
34void UnaryEW(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
35void UnaryEWCPU(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
36
37#ifdef BUILD_SYCL_MODULE
38void UnaryEWSYCL(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
39#endif
40
41#ifdef BUILD_CUDA_MODULE
42void 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.
47void Copy(const Tensor& src, Tensor& dst);
48
49void CopyCPU(const Tensor& src, Tensor& dst);
50
51#ifdef BUILD_CUDA_MODULE
52void CopyCUDA(const Tensor& src, Tensor& dst);
53#endif
54
55#ifdef BUILD_SYCL_MODULE
56void 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