ILGPU  0.9.0
ILGPU.Runtime.CPU.CPURuntimeGroupContext Class Reference

Represents a runtime context for thread groups. More...

Inheritance diagram for ILGPU.Runtime.CPU.CPURuntimeGroupContext:
ILGPU.Util.DisposeBase

Public Member Functions

 CPURuntimeGroupContext (CPUAccelerator accelerator)
 Constructs a new CPU-based runtime context for parallel processing. More...
 
ArrayView< T > AllocateSharedMemoryDynamic< T > ()
 Performs a dynamic shared-memory allocation. More...
 
ArrayView< T > AllocateSharedMemory< T > (int extent)
 Performs a shared-memory allocation. More...
 
void WaitForNextThreadIndex ()
 This method waits for all threads to complete and resets all information that might be required for the next thread index. More...
 
Broadcast< T > (T value, int groupIndex)
 Executes a broadcast operation. More...
 
void Barrier ()
 Executes a thread barrier. More...
 
int BarrierPopCount (bool predicate)
 Executes a thread barrier and returns the number of threads for which the predicate evaluated to true. More...
 
bool BarrierAnd (bool predicate)
 Executes a thread barrier and returns true if all threads in a block fulfills the predicate. More...
 
bool BarrierOr (bool predicate)
 Executes a thread barrier and returns true if any thread in a block fulfills the predicate. More...
 
- Public Member Functions inherited from ILGPU.Util.DisposeBase
void Dispose ()
 Triggers the 'dispose' functionality of this object. More...
 

Protected Member Functions

override void Dispose (bool disposing)
 

Properties

static CPURuntimeGroupContext Current [get]
 Returns the current group runtime context. More...
 
CPUAccelerator Accelerator [get]
 Returns the associated accelerator. More...
 
ArrayView< byte > SharedMemory [get]
 Returns the associated shared memory. More...
 

Detailed Description

Represents a runtime context for thread groups.

Constructor & Destructor Documentation

ILGPU.Runtime.CPU.CPURuntimeGroupContext.CPURuntimeGroupContext ( CPUAccelerator  accelerator)

Constructs a new CPU-based runtime context for parallel processing.

Parameters
acceleratorThe target CPU accelerator.

Member Function Documentation

ArrayView<T> ILGPU.Runtime.CPU.CPURuntimeGroupContext.AllocateSharedMemory< T > ( int  extent)

Performs a shared-memory allocation.

Parameters
extentThe number of elements.
Returns
The resolved shared-memory array view.
Type Constraints
T :unmanaged 
ArrayView<T> ILGPU.Runtime.CPU.CPURuntimeGroupContext.AllocateSharedMemoryDynamic< T > ( )

Performs a dynamic shared-memory allocation.

Returns
The resolved shared-memory array view.
Type Constraints
T :unmanaged 
T :AllocateSharedMemory<T> 
T :dynamicSharedMemoryArrayLength 
void ILGPU.Runtime.CPU.CPURuntimeGroupContext.Barrier ( )

Executes a thread barrier.

bool ILGPU.Runtime.CPU.CPURuntimeGroupContext.BarrierAnd ( bool  predicate)

Executes a thread barrier and returns true if all threads in a block fulfills the predicate.

Parameters
predicateThe predicate to check.
Returns
True, if all threads in a block fulfills the predicate.
bool ILGPU.Runtime.CPU.CPURuntimeGroupContext.BarrierOr ( bool  predicate)

Executes a thread barrier and returns true if any thread in a block fulfills the predicate.

Parameters
predicateThe predicate to check.
Returns
True, if any thread in a block fulfills the predicate.
int ILGPU.Runtime.CPU.CPURuntimeGroupContext.BarrierPopCount ( bool  predicate)

Executes a thread barrier and returns the number of threads for which the predicate evaluated to true.

Parameters
predicateThe predicate to check.
Returns
The number of threads for which the predicate evaluated to true.
T ILGPU.Runtime.CPU.CPURuntimeGroupContext.Broadcast< T > ( value,
int  groupIndex 
)

Executes a broadcast operation.

Parameters
valueThe desired group index.
groupIndexThe source thread index within the group.
Type Constraints
T :unmanaged 
override void ILGPU.Runtime.CPU.CPURuntimeGroupContext.Dispose ( bool  disposing)
protectedvirtual

Reimplemented from ILGPU.Util.DisposeBase.

void ILGPU.Runtime.CPU.CPURuntimeGroupContext.WaitForNextThreadIndex ( )

This method waits for all threads to complete and resets all information that might be required for the next thread index.

Property Documentation

CPUAccelerator ILGPU.Runtime.CPU.CPURuntimeGroupContext.Accelerator
get

Returns the associated accelerator.

CPURuntimeGroupContext ILGPU.Runtime.CPU.CPURuntimeGroupContext.Current
staticget

Returns the current group runtime context.

ArrayView<byte> ILGPU.Runtime.CPU.CPURuntimeGroupContext.SharedMemory
get

Returns the associated shared memory.


The documentation for this class was generated from the following file: