20 const std::vector<Tensor>& index_tensors,
24 AdvancedIndexer ai(src, dst, index_tensors, indexed_shape, indexed_strides,
29 int64_t object_byte_size = dtype.
ByteSize();
36 queue.parallel_for(ai.
NumWorkloads(), [ai](int64_t idx) {
38 *reinterpret_cast<scalar_t*>(ai.GetOutputPtr(idx)) =
39 *reinterpret_cast<const scalar_t*>(
48 const std::vector<Tensor>& index_tensors,
52 AdvancedIndexer ai(src, dst, index_tensors, indexed_shape, indexed_strides,
57 int64_t object_byte_size = dtype.
ByteSize();
64 queue.parallel_for(ai.
NumWorkloads(), [ai](int64_t idx) {
66 *reinterpret_cast<scalar_t*>(ai.GetOutputPtr(idx)) =
67 *reinterpret_cast<const scalar_t*>(
#define DISPATCH_DTYPE_TO_TEMPLATE_WITH_BOOL(DTYPE,...)
CLOUDVIEWER_HOST_DEVICE char * GetOutputPtr(int64_t workload_idx) const
int64_t NumWorkloads() const
CLOUDVIEWER_HOST_DEVICE char * GetInputPtr(int64_t workload_idx) const
Device GetDevice() const override
static SYCLContext & GetInstance()
Get singleton instance.
sycl::queue GetDefaultQueue(const Device &device)
Get the default SYCL queue given an CloudViewer device.
void IndexSetSYCL(const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
void IndexGetSYCL(const Tensor &src, Tensor &dst, const std::vector< Tensor > &index_tensors, const SizeVector &indexed_shape, const SizeVector &indexed_strides)
Generic file read and write utility for python interface.