DotMP
Package Functions | Properties | Private Attributes | List of all members
DotMP.GPU.GPUArray< T > Struct Template Reference

Wrapper object for representing arrays on the GPU. More...

Package Functions

 GPUArray (Buffer< T > buf)
 Constructor. More...
 

Properties

ref T this[int idx] [get]
 Overload for [] operator. More...
 
ref T this[int i, int j] [get]
 Overload for [,] operator. More...
 
ref T this[int i, int j, int k] [get]
 Overload for [,,] operator. More...
 
int Length [get]
 Gets the length of the array. More...
 

Private Attributes

ArrayView1D< T, Stride1D.Dense > view
 The ILGPU view for 1D arrays. More...
 
int stride_y
 Stride of Y dimension. More...
 
int stride_z
 Stride of Z dimension. More...
 

Detailed Description

Wrapper object for representing arrays on the GPU.

Template Parameters
T
Type Constraints
T :unmanaged 

Constructor & Destructor Documentation

◆ GPUArray()

DotMP.GPU.GPUArray< T >.GPUArray ( Buffer< T >  buf)
inlinepackage

Constructor.

Parameters
bufThe Buffer to create an array from.

Member Data Documentation

◆ stride_y

int DotMP.GPU.GPUArray< T >.stride_y
private

Stride of Y dimension.

◆ stride_z

int DotMP.GPU.GPUArray< T >.stride_z
private

Stride of Z dimension.

◆ view

ArrayView1D<T, Stride1D.Dense> DotMP.GPU.GPUArray< T >.view
private

The ILGPU view for 1D arrays.

Property Documentation

◆ Length

int DotMP.GPU.GPUArray< T >.Length
get

Gets the length of the array.

◆ this[int i, int j, int k]

ref T DotMP.GPU.GPUArray< T >.this[int i, int j, int k]
get

Overload for [,,] operator.

Parameters
iThe first ID to index into.
jThe second ID to index into.
kThe third ID to index into.
Returns
The data at that ID.

◆ this[int i, int j]

ref T DotMP.GPU.GPUArray< T >.this[int i, int j]
get

Overload for [,] operator.

Parameters
iThe first ID to index into.
jThe second ID to index into.
Returns
The data at that ID.

◆ this[int idx]

ref T DotMP.GPU.GPUArray< T >.this[int idx]
get

Overload for [] operator.

Parameters
idxThe ID to index into.
Returns
The data at that ID.

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