DotMP
|
A specialization of Shared for items that can be indexed with square brackets. The DotMP-parallelized Conjugate Gradient example shows this off fairly well inside of the SpMV function. More...
Public Member Functions | |
SharedEnumerable (string name, U value) | |
Constructs a new shared variable with the given name and value. More... | |
new void | Dispose () |
Clears the shared variable from memory. Must be called from all threads in the parallel region. Acts as a barrier. More... | |
new U | Get () |
Gets the value of the shared variable as an IList<T>. More... | |
Public Member Functions inherited from DotMP.Shared< U > | |
Shared (string name, T value) | |
Creates a new shared variable with the given name and value. Must be called from all threads in the parallel region. Acts as a barrier. More... | |
void | Dispose () |
Clears the shared variable from memory. Must be called from all threads in the parallel region. Acts as a barrier. More... | |
virtual void | Dispose (bool disposing) |
Clears the shared variable from memory. Virtual implementation for IDisposable interface. More... | |
void | Set (T value) |
Sets the value of the shared variable. Is not thread-safe, so user must ensure thread safety. More... | |
T | Get () |
Gets the value of the shared variable. More... | |
Static Public Member Functions | |
static implicit | operator U (SharedEnumerable< T, U > shared) |
Allows for implicit conversion to an array. More... | |
static SharedEnumerable< T, T[]> | Create< T > (string name, T[] value) |
Factory method for creating shared arrays. More... | |
static SharedEnumerable< T, List< T > > | Create< T > (string name, List< T > value) |
Factory method for creating shared Lists. More... | |
Static Public Member Functions inherited from DotMP.Shared< U > | |
static implicit | operator T (Shared< T > shared) |
Gets the value of the shared variable. More... | |
static Shared< T > | Create< T > (string name, T value) |
Factory method for creating shared variables. More... | |
Properties | |
T | this[int index] [get, set] |
Allows for indexing into the shared variable with square brackets. More... | |
Properties inherited from DotMP.Shared< U > | |
bool | Disposed [get, private set] |
Whether or not the shared variable has been disposed. More... | |
Additional Inherited Members | |
Static Protected Attributes inherited from DotMP.Shared< U > | |
static Dictionary< string, dynamic > | shared |
The shared variables. More... | |
A specialization of Shared for items that can be indexed with square brackets. The DotMP-parallelized Conjugate Gradient example shows this off fairly well inside of the SpMV function.
The factory class for SharedEnumerable<T, U>
T | The type that the IList is containing. |
U | The full IList type. |
U | : | IList<T> |
|
inline |
Constructs a new shared variable with the given name and value.
name | The name of the shared variable. |
value | The value of the shared variable. |
|
inlinestatic |
Factory method for creating shared Lists.
T | The type the array contains. |
name | The name of the shared enumerable. |
value | Initial starting value of the shared enumerable. |
|
inlinestatic |
Factory method for creating shared arrays.
T | The type the array contains. |
name | The name of the shared enumerable. |
value | Initial starting value of the shared enumerable. |
|
inline |
Clears the shared variable from memory. Must be called from all threads in the parallel region. Acts as a barrier.
|
inline |
Gets the value of the shared variable as an IList<T>.
|
inlinestatic |
Allows for implicit conversion to an array.
shared | A SharedEnumerable object. |
|
getset |
Allows for indexing into the shared variable with square brackets.
index | The index to fetch. |