pystencils.codegen.gpu_indexing.GpuIndexing#
- class pystencils.codegen.gpu_indexing.GpuIndexing(ctx, target, scheme, warp_size, manual_launch_grid=False, assume_warp_aligned_block_size=False)#
Factory for GPU indexing objects required during code generation.
This class acts as a helper class for the code generation driver. It produces both the
ThreadMapping
required by the backend, as well as factories for the launch configuration required later by the runtime system.- Parameters:
ctx (
KernelCreationContext
) – The kernel creation contextscheme (
GpuIndexingScheme
) – The desired GPU indexing schemeblock_size – A user-defined default block size, required only if the indexing scheme permits modification of the block size
manual_launch_grid (
bool
) – IfTrue
, always emit aManualLaunchConfiguration
to force the runtime system to set the launch configuration explicitlytarget (Target)
warp_size (int | None)
assume_warp_aligned_block_size (bool)
- get_thread_mapping()#
Retrieve a thread mapping object for use by the backend
- Return type:
- get_launch_config_factory()#
Retrieve a factory for the launch configuration for later consumption by the runtime system
- Return type: