19#ifdef SYCL_LANGUAGE_VERSION
20#include <sycl/sycl.hpp>
34 if (object_byte_size % divisor == 0) {
45#include <cuda_runtime.h>
56#define DISPATCH_DIVISOR_SIZE_TO_BLOCK_T(DIVISOR, ...) \
58 if (DIVISOR == 64) { \
59 using block_t = BlockCopy64; \
60 return __VA_ARGS__(); \
61 } else if (DIVISOR == 16) { \
62 using block_t = int4; \
63 return __VA_ARGS__(); \
64 } else if (DIVISOR == 12) { \
65 using block_t = int3; \
66 return __VA_ARGS__(); \
67 } else if (DIVISOR == 4) { \
68 using block_t = int; \
69 return __VA_ARGS__(); \
71 using block_t = uint8_t; \
72 return __VA_ARGS__(); \
77#ifdef SYCL_LANGUAGE_VERSION
84#define DISPATCH_DIVISOR_SIZE_TO_BLOCK_T_SYCL(DIVISOR, ...) \
86 if (DIVISOR == 64) { \
87 using block_t = sycl::vec<uint32_t, 16>; \
88 return __VA_ARGS__(); \
89 } else if (DIVISOR == 16) { \
90 using block_t = sycl::vec<uint32_t, 4>; \
91 return __VA_ARGS__(); \
92 } else if (DIVISOR == 12) { \
93 using block_t = sycl::vec<uint32_t, 3>; \
94 return __VA_ARGS__(); \
95 } else if (DIVISOR == 4) { \
96 using block_t = uint32_t; \
97 return __VA_ARGS__(); \
99 using block_t = uint8_t; \
100 return __VA_ARGS__(); \
constexpr int64_t kBlockCopyDivisors[]
Definition BlockCopyDispatch.h:29
int64_t GetLargestAlignedObjectBlockSize(int64_t object_byte_size)
Largest entry in kBlockCopyDivisors that divides object_byte_size.
Definition BlockCopyDispatch.h:32
Definition PinholeCameraIntrinsic.cpp:16