Struct thread_block
Every GPU kernel is executed by a grid of thread blocks, and threads within each block are guaranteed to reside on the same streaming multiprocessor. A thread_block represents a thread block whose dimensions are not known until runtime.
Inherited Members
System.ValueType.Equals(System.Object)
System.ValueType.GetHashCode()
System.ValueType.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: Hybridizer.Runtime.CUDAImports
Assembly: Hybridizer.Runtime.CUDAImports.dll
Syntax
[IntrinsicType("cooperative_groups::thread_block")]
public struct thread_block
Methods
group_dim()
equivalent of blockDim
Declaration
public dim3 group_dim()
Returns
Type | Description |
---|---|
dim3 |
group_index()
equivalent of blockIdx
Declaration
public dim3 group_index()
Returns
Type | Description |
---|---|
dim3 |
size()
Get the size (total number of threads) of a group
Declaration
public uint size()
Returns
Type | Description |
---|---|
System.UInt32 |
sync()
synchronize threads within the group
Declaration
public void sync()
thread_index()
equivalent of threadIdx
Declaration
public dim3 thread_index()
Returns
Type | Description |
---|---|
dim3 |
thread_rank()
Thread index within the group
Declaration
public uint thread_rank()
Returns
Type | Description |
---|---|
System.UInt32 |
Operators
Implicit(thread_block to thread_group)
Declaration
[IntrinsicFunction("")]
public static implicit operator thread_group(thread_block tb)
Parameters
Type | Name | Description |
---|---|---|
thread_block | tb |
Returns
Type | Description |
---|---|
thread_group |