ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
BinaryEWSYCL.cpp File Reference
Include dependency graph for BinaryEWSYCL.cpp:

Go to the source code of this file.

Namespaces

 cloudViewer
 Generic file read and write utility for python interface.
 
 cloudViewer::core
 
 cloudViewer::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 cloudViewer::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); \
} \
}
Indexer indexer
std::string name

Definition at line 98 of file BinaryEWSYCL.cpp.

◆ 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 = (*lhs)elem_op(*rhs); \
} \
}

Definition at line 98 of file BinaryEWSYCL.cpp.

◆ 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 = static_cast<bool>(*lhs) elem_op static_cast<bool>(*rhs); \
} \
}

Definition at line 98 of file BinaryEWSYCL.cpp.

Variable Documentation

◆ indexer