Method GetOrCreate
GetOrCreate<TContext>(uint)
Creates a shared static data for the specified context (usable from both C# and HPC#)
Declaration
public static SharedStatic<T> GetOrCreate<TContext>(uint alignment = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | 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>(uint)
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 = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | 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, uint)
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 = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | contextType | A type class that uniquely identifies the this shared data |
| uint | alignment | Optional alignment |
Returns
| Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |
GetOrCreate(Type, Type, uint)
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 = 0)
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 |
| uint | alignment | Optional alignment |
Returns
| Type | Description |
|---|---|
| SharedStatic<T> | A shared static for the specified context |