Loading [MathJax]/extensions/TeX/AMSsymbols.js
Open3D (C++ API)  0.19.0
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Macros | Functions
UnaryEWSYCL.cpp File Reference

(1e7b174 (Tue Jan 7 15:20:18 2025 -0800))

#include <cmath>
#include <cstring>
#include "open3d/core/Dispatch.h"
#include "open3d/core/Dtype.h"
#include "open3d/core/Indexer.h"
#include "open3d/core/MemoryManager.h"
#include "open3d/core/ParallelFor.h"
#include "open3d/core/ParallelForSYCL.h"
#include "open3d/core/SizeVector.h"
#include "open3d/core/Tensor.h"
#include "open3d/core/kernel/UnaryEW.h"
#include "open3d/utility/Logging.h"

Namespaces

 open3d
 
 open3d::core
 
 open3d::core::kernel
 

Macros

#define UNARY_ELEMENT_KERNEL(name, elem_op)
 
#define UNARY_ELEMENT_KERNEL(name, elem_op)
 

Functions

void open3d::core::kernel::CopySYCL (const Tensor &src, Tensor &dst)
 
void open3d::core::kernel::UnaryEWSYCL (const Tensor &src, Tensor &dst, UnaryEWOpCode op_code)
 

Macro Definition Documentation

◆ UNARY_ELEMENT_KERNEL [1/2]

#define UNARY_ELEMENT_KERNEL (   name,
  elem_op 
)
Value:
template <typename src_t> \
struct name##ElementKernel : public UnaryElementKernel { \
using UnaryElementKernel::UnaryElementKernel; \
void operator()(int64_t i) { \
const src_t* src = indexer.GetInputPtr<src_t>(0, i); \
src_t* dst = indexer.GetOutputPtr<src_t>(i); \
*dst = static_cast<src_t>(elem_op(static_cast<double>(*src))); \
} \
}; \
template <> \
struct name##ElementKernel<float> : public UnaryElementKernel { \
using UnaryElementKernel::UnaryElementKernel; \
void operator()(int64_t i) { \
const float* src = indexer.GetInputPtr<float>(0, i); \
float* dst = indexer.GetOutputPtr<float>(i); \
*dst = elem_op(*src); \
} \
}
Indexer indexer
Definition: UnaryEWSYCL.cpp:33
std::string name
Definition: FilePCD.cpp:39

◆ UNARY_ELEMENT_KERNEL [2/2]

#define UNARY_ELEMENT_KERNEL (   name,
  elem_op 
)
Value:
template <typename src_t> \
struct name##ElementKernel : public UnaryElementKernel { \
using UnaryElementKernel::UnaryElementKernel; \
void operator()(int64_t i) { \
const src_t* src = indexer.GetInputPtr<src_t>(0, i); \
bool* dst = indexer.GetOutputPtr<bool>(i); \
*dst = elem_op(static_cast<double>(*src)); \
} \
}; \
template <> \
struct name##ElementKernel<float> : public UnaryElementKernel { \
using UnaryElementKernel::UnaryElementKernel; \
void operator()(int64_t i) { \
const float* src = indexer.GetInputPtr<float>(0, i); \
bool* dst = indexer.GetOutputPtr<bool>(i); \
*dst = elem_op(*src); \
} \
}

Variable Documentation

◆ indexer

Indexer indexer
protected