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

Namespaces

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

Macros

#define BINARY_ELEMENT_KERNEL(name, elem_fn)
#define BINARY_ELEMENT_KERNEL(name, elem_op)
#define BINARY_ELEMENT_KERNEL(name, elem_op)

Functions

void open3d::core::kernel::BinaryEWSYCL (const Tensor &lhs, const Tensor &rhs, Tensor &dst, BinaryEWOpCode op_code)

Macro Definition Documentation

◆ BINARY_ELEMENT_KERNEL [1/3]

#define BINARY_ELEMENT_KERNEL ( name,
elem_fn )
Value:
template <typename src_t, typename dst_t = src_t> \
struct name##ElementKernel : public BinaryElementKernel { \
using BinaryElementKernel::BinaryElementKernel; \
void operator()(int64_t i) { \
const src_t* lhs = indexer.GetInputPtr<src_t>(0, i); \
const src_t* rhs = indexer.GetInputPtr<src_t>(1, i); \
dst_t* dst = indexer.GetOutputPtr<dst_t>(i); \
*dst = elem_fn(*lhs, *rhs); \
} \
}

◆ BINARY_ELEMENT_KERNEL [2/3]

#define BINARY_ELEMENT_KERNEL ( name,
elem_op )
Value:
template <typename src_t, typename dst_t = src_t> \
struct name##ElementKernel : public BinaryElementKernel { \
using BinaryElementKernel::BinaryElementKernel; \
void operator()(int64_t i) { \
const src_t* lhs = indexer.GetInputPtr<src_t>(0, i); \
const src_t* rhs = indexer.GetInputPtr<src_t>(1, i); \
dst_t* dst = indexer.GetOutputPtr<dst_t>(i); \
*dst = static_cast<bool>(*lhs) elem_op static_cast<bool>(*rhs); \
} \
}

◆ BINARY_ELEMENT_KERNEL [3/3]

#define BINARY_ELEMENT_KERNEL ( name,
elem_op )
Value:
template <typename src_t, typename dst_t = src_t> \
struct name##ElementKernel : public BinaryElementKernel { \
using BinaryElementKernel::BinaryElementKernel; \
void operator()(int64_t i) { \
const src_t* lhs = indexer.GetInputPtr<src_t>(0, i); \
const src_t* rhs = indexer.GetInputPtr<src_t>(1, i); \
dst_t* dst = indexer.GetOutputPtr<dst_t>(i); \
*dst = (*lhs)elem_op(*rhs); \
} \
}