C++-API#
Device Info#
Device Info Functions#
get_support_level(sycl::device const&)#
-
auto tinytc::get_support_level(sycl::device const &dev) -> support_level#
Get support level of SYCL device.
- Parameters:
dev – Device
- Returns:
Support Level
make_core_info(sycl::device const&)#
Kernel#
Functions
Kernel Functions#
get_execution_range#
-
auto tinytc::get_execution_range(sycl::kernel const &krnl, std::int64_t howmany) -> sycl::nd_range<3u>#
Get SYCL nd_range.
- Parameters:
krnl – Kernel
howmany – Group size
- Returns:
ND range
get_global_size(std::int64_t,sycl::range<3u> const &)#
-
auto tinytc::get_global_size(std::int64_t howmany, sycl::range<3u> const &local_size) -> sycl::range<3u>#
Convert group size to SYCL range.
- Parameters:
howmany – Group size
local_size – Work-group size
- Returns:
Global size
get_group_size(sycl::kernel const &)#
-
auto tinytc::get_group_size(sycl::kernel const &krnl) -> sycl::range<3u>#
Get work-group size.
- Parameters:
krnl – Kernel
- Returns:
Work-group size
make_kernel(sycl::kernel_bundle<sycl::bundle_state::executable> const &,char const *)#
-
auto tinytc::make_kernel(sycl::kernel_bundle<sycl::bundle_state::executable> const &bundle, char const *name) -> sycl::kernel#
Make SYCL kernel.
- Parameters:
bundle – Kernel bundle
name – Kernel name
- Returns:
SYCL kernel
make_kernel_bundle(sycl::context const &,sycl::device const &,binary const &,source_context)#
-
auto tinytc::make_kernel_bundle(sycl::context const &ctx, sycl::device const &dev, binary const &bin, source_context source_ctx = {}) -> sycl::kernel_bundle<sycl::bundle_state::executable>#
Make SYCL kernel bundle from tinytc binary.
- Parameters:
ctx – Context
dev – Device
bin – Binary
source_ctx – Source context for improved error reporting
- Returns:
SYCL kernel bundle
make_kernel_bundle(sycl::context const &,sycl::device const &,prog,tinytc_core_feature_flags_t,source_context)#
-
auto tinytc::make_kernel_bundle(sycl::context const &ctx, sycl::device const &dev, prog prg, tinytc_core_feature_flags_t core_features = 0, source_context source_ctx = {}) -> sycl::kernel_bundle<sycl::bundle_state::executable>#
Make SYCL kernel bundle from tinytc program.
- Parameters:
ctx – Context
dev – Device
prg – Program
core_features – requested core features; must be 0 (default) or a combination of tinytc_core_feature_flag_t
source_ctx – Source context for improved error reporting
- Returns:
SYCL kernel bundle
make_kernel_bundle(sycl::context const &,sycl::device const &,source const &,source_context)#
-
auto tinytc::make_kernel_bundle(sycl::context const &ctx, sycl::device const &dev, source const &src, source_context source_ctx = {}) -> sycl::kernel_bundle<sycl::bundle_state::executable>#
Make SYCL kernel bundle from tinytc source.
- Parameters:
ctx – Context
dev – Device
src – Source
source_ctx – Source context for improved error reporting
- Returns:
SYCL kernel bundle
Recipe#
Functions
Classes
Recipe Functions#
make_recipe_handler(sycl::context const &,sycl::device const &,recipe const &,source_context)#
-
auto tinytc::make_recipe_handler(sycl::context const &ctx, sycl::device const &dev, recipe const &rec, source_context source_ctx = {}) -> sycl_recipe_handler#
Make recipe handler.
- Parameters:
ctx – Context
dev – Device
rec – Recipe
source_ctx – Source context for improved error reporting
- Returns:
SYCL recipe handler
make_recipe_handler(sycl::queue const&,recipe const&,source_context)#
-
auto tinytc::make_recipe_handler(sycl::queue const &q, recipe const &rec, source_context source_ctx = {}) -> sycl_recipe_handler#
Make recipe handler.
- Parameters:
q – Queue
rec – Recipe
source_ctx – Source context for improved error reporting
- Returns:
SYCL recipe handler
Recipe Classes#
sycl_recipe_handler#
-
class sycl_recipe_handler : public tinytc::recipe_handler#
Recipe handler for the SYCL runtime.
Public Functions
-
void parallel_for(sycl::handler &h)#
Launch recipe with submit call.
- Parameters:
h – Handler
-
auto submit(sycl::queue q) -> sycl::event#
Submit recipe to queue.
- Parameters:
q – Queue
- Returns:
Event
-
auto submit(sycl::queue q, sycl::event const &dep_event) -> sycl::event#
Submit recipe to queue.
- Parameters:
q – Queue
dep_event – Event to wait on
- Returns:
Event
-
auto submit(sycl::queue q, std::vector<sycl::event> const &dep_events) -> sycl::event#
Submit recipe to queue.
- Parameters:
q – Queue
dep_events – Events to wait on
- Returns:
Event
-
void parallel_for(sycl::handler &h)#