Open3D (C++ API)  0.19.0
Loading...
Searching...
No Matches
UnaryEWSYCL.cpp File Reference

Namespaces

namespace  open3d
namespace  open3d::core
namespace  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); \
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); \
} \
}
const char const char value recording_handle imu_sample recording_handle uint8_t size_t data_size k4a_record_configuration_t config target_format k4a_capture_t capture_handle k4a_imu_sample_t imu_sample playback_handle k4a_logging_message_cb_t void min_level device_handle k4a_imu_sample_t timeout_in_ms capture_handle capture_handle capture_handle image_handle float
Definition K4aPlugin.cpp:460
const char name
Definition K4aPlugin.cpp:210

◆ 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); \
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); \
} \
}