Method GetOrCreate
GetOrCreate<TContext>(UInt32)
Creates a shared static data for the specified context (usable from both C# and HPC#)
Declaration
public static SharedStatic<T> GetOrCreate<TContext>(uint alignment = 0U)Parameters
| Type | Name | Description | 
|---|---|---|
| UInt32 | alignment | Optional alignment | 
Returns
| Type | Description | 
|---|---|
| SharedStatic<T> | A shared static for the specified context | 
Type Parameters
| Name | Description | 
|---|---|
| TContext | A type class that uniquely identifies the this shared data. | 
GetOrCreate<TContext, TSubContext>(UInt32)
Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)
Declaration
public static SharedStatic<T> GetOrCreate<TContext, TSubContext>(uint alignment = 0U)Parameters
| Type | Name | Description | 
|---|---|---|
| UInt32 | alignment | Optional alignment | 
Returns
| Type | Description | 
|---|---|
| SharedStatic<T> | A shared static for the specified context | 
Type Parameters
| Name | Description | 
|---|---|
| TContext | A type class that uniquely identifies the this shared data. | 
| TSubContext | A type class that uniquely identifies this shared data within a sub-context of the primary context | 
GetOrCreate(Type, UInt32)
Creates a shared static data for the specified context (reflection based, only usable from C#, but not from HPC#)
Declaration
public static SharedStatic<T> GetOrCreate(Type contextType, uint alignment = 0U)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | contextType | A type class that uniquely identifies the this shared data | 
| UInt32 | alignment | Optional alignment | 
Returns
| Type | Description | 
|---|---|
| SharedStatic<T> | A shared static for the specified context | 
GetOrCreate(Type, Type, UInt32)
Creates a shared static data for the specified context and sub-context (usable from both C# and HPC#)
Declaration
public static SharedStatic<T> GetOrCreate(Type contextType, Type subContextType, uint alignment = 0U)Parameters
| Type | Name | Description | 
|---|---|---|
| Type | contextType | A type class that uniquely identifies the this shared data | 
| Type | subContextType | A type class that uniquely identifies this shared data within a sub-context of the primary context | 
| UInt32 | alignment | Optional alignment | 
Returns
| Type | Description | 
|---|---|
| SharedStatic<T> | A shared static for the specified context |