Open3D (C++ API)  0.18.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-2023 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);
35
36void UnaryEWCPU(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
37
38#ifdef BUILD_CUDA_MODULE
39void UnaryEWCUDA(const Tensor& src, Tensor& dst, UnaryEWOpCode op_code);
40#endif
41
42// Copy is separated from other unary ops since it support cross-device copy and
43// dtype casting.
44void Copy(const Tensor& src, Tensor& dst);
45
46void CopyCPU(const Tensor& src, Tensor& dst);
47
48#ifdef BUILD_CUDA_MODULE
49void CopyCUDA(const Tensor& src, Tensor& dst);
50#endif
51
52} // namespace kernel
53} // namespace core
54} // namespace open3d
Definition Tensor.h:32
UnaryEWOpCode
Definition UnaryEW.h:17
void Copy(const Tensor &src, Tensor &dst)
Definition UnaryEW.cpp:46
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
Definition PinholeCameraIntrinsic.cpp:16