28namespace shamalgs::reduction::details {
29#ifdef SYCL2020_FEATURE_GROUP_REDUCTION
44 const sham::DeviceScheduler_ptr &sched,
48 u32 work_group_size) {
51 if (start_id >= end_id) {
55 return reduc_internal<T>(
61 [](sycl::group<1> g, T v) {
62 return sham::sum_over_group(g, v);
85 const sham::DeviceScheduler_ptr &sched,
89 u32 work_group_size) {
91 if (start_id >= end_id) {
93 "Empty range (or invalid range) not supported for max operation\n start_id = {}, "
99 return reduc_internal<T>(
105 [](sycl::group<1> g, T v) {
106 return sham::max_over_group(g, v);
109 return sham::max(lhs, rhs);
129 const sham::DeviceScheduler_ptr &sched,
133 u32 work_group_size) {
135 if (start_id >= end_id) {
137 "Empty range (or invalid range) not supported for min operation\n start_id = {}, "
143 return reduc_internal<T>(
149 [](sycl::group<1> g, T v) {
150 return sham::min_over_group(g, v);
153 return sham::min(lhs, rhs);
164 #ifdef SYCL2020_FEATURE_GROUP_REDUCTION
189 template _arg_ shamalgs::reduction::details::sum_usm_group<_arg_>( \
190 const sham::DeviceScheduler_ptr &sched, \
191 const sham::DeviceBuffer<_arg_> &buf1, \
194 u32 work_group_size); \
195 template _arg_ shamalgs::reduction::details::max_usm_group<_arg_>( \
196 const sham::DeviceScheduler_ptr &sched, \
197 const sham::DeviceBuffer<_arg_> &buf1, \
200 u32 work_group_size); \
201 template _arg_ shamalgs::reduction::details::min_usm_group<_arg_>( \
202 const sham::DeviceScheduler_ptr &sched, \
203 const sham::DeviceBuffer<_arg_> &buf1, \
206 u32 work_group_size);
std::uint32_t u32
32 bit unsigned integer
A buffer allocated in USM (Unified Shared Memory)
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
main include file for memory algorithms