Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Namespaces | Enumerations | Functions | Variables
sycl_utils.hpp File Reference
#include "shambase/exception.hpp"
#include "shambase/integer.hpp"
#include "shambase/stacktrace.hpp"
#include "shambackends/sycl.hpp"
#include "shambackends/vec.hpp"
#include "shamcomm/logs.hpp"
#include <stdexcept>
+ Include dependency graph for sycl_utils.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  shambase
 namespace for basic c++ utilities
 

Enumerations

enum  ParallelForWrapMode { PARALLEL_FOR , PARALLEL_FOR_ROUND , ND_RANGE }
 

Functions

template<class T >
void shambase::check_buffer_size (sycl::buffer< T > &buf, u64 max_range, const SourceLocation loc=SourceLocation())
 check that the size of a sycl buffer is below or equal to the value of max range throw if it is not the case
 
std::string shambase::getDevice_type (const sycl::device &Device)
 Get the Device Type Name.
 
sycl::nd_range< 1 > shambase::make_range (u32 length, const u32 group_size=32)
 Generate a sycl nd range out of a group size and length.
 
template<u32 group_size = default_gsize, ParallelForWrapMode mode = default_loop_mode, class LambdaKernel >
void shambase::parallel_for (sycl::handler &cgh, u32 length, const char *name, LambdaKernel &&ker)
 
template<u32 group_size = default_gsize_2d, ParallelForWrapMode mode = default_loop_mode, class LambdaKernel >
void shambase::parallel_for_2d (sycl::handler &cgh, u32 length_x, u32 length_y, const char *name, LambdaKernel &&ker)
 
template<u32 group_size = default_gsize_3d, ParallelForWrapMode mode = default_loop_mode, class LambdaKernel >
void shambase::parallel_for_3d (sycl::handler &cgh, u32 length_x, u32 length_y, u32 length_z, const char *name, LambdaKernel &&ker)
 
template<ParallelForWrapMode mode = default_loop_mode, class LambdaKernel >
void shambase::parallel_for_gsize (sycl::handler &cgh, u32 length, u32 group_size, const char *name, LambdaKernel &&ker)
 
void shambase::check_queue_state (sycl::queue &q, SourceLocation loc=SourceLocation())
 

Variables

constexpr u32 shambase::default_gsize = SHAMROCK_LOOP_GSIZE
 
constexpr u32 shambase::default_gsize_2d = 16
 
constexpr u32 shambase::default_gsize_3d = 4
 

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file sycl_utils.hpp.