MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / range

Function range

src/backend/oneapi/kernel/range.hpp:93–114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91
92template<typename T>
93void range(Param<T> out, const int dim) {
94 constexpr int RANGE_TX = 32;
95 constexpr int RANGE_TY = 8;
96 constexpr int RANGE_TILEX = 512;
97 constexpr int RANGE_TILEY = 32;
98
99 sycl::range<2> local(RANGE_TX, RANGE_TY);
100
101 int blocksPerMatX = divup(out.info.dims[0], RANGE_TILEX);
102 int blocksPerMatY = divup(out.info.dims[1], RANGE_TILEY);
103 sycl::range<2> global(local[0] * blocksPerMatX * out.info.dims[2],
104 local[1] * blocksPerMatY * out.info.dims[3]);
105 sycl::nd_range<2> ndrange(global, local);
106
107 getQueue().submit([&](sycl::handler& h) {
108 write_accessor<T> out_acc{*out.data, h};
109
110 h.parallel_for(ndrange, rangeOp<T>(out_acc, out.info, dim,
111 blocksPerMatX, blocksPerMatY));
112 });
113 ONEAPI_DEBUG_FINISH(getQueue());
114}
115
116} // namespace kernel
117} // namespace oneapi

Callers 15

reorderFunction · 0.70
convSepFunction · 0.70
unwrapFunction · 0.70
reorderOutputHelperFunction · 0.70
resizeFunction · 0.70
padDataHelperFunction · 0.70
coo2denseFunction · 0.70
csr2denseFunction · 0.70
dense2csrFunction · 0.70
swapIndexFunction · 0.70
csr2cooFunction · 0.70
coo2csrFunction · 0.70

Calls 1

getQueueFunction · 0.50

Tested by

no test coverage detected