Beispiel #1
0
 public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, Index2 extent)
     where T : struct =>
 new ArrayView3D <T>(view, extent.X, extent.Y);
Beispiel #2
0
 public ArrayView <T> GetRowView(Index2 index) =>
 GetRowView(index.X, index.Y);
Beispiel #3
0
 public static ArrayView2D <T> As2DView <T>(this ArrayView <T> view, Index2 extent)
     where T : struct =>
 new ArrayView2D <T>(view, extent);
Beispiel #4
0
 public ref T this[Index2 xy, int z] => ref this[xy.X, xy.Y, z];
Beispiel #5
0
 public ref T this[int x, Index2 yz] => ref this[x, yz.X, yz.Y];
Beispiel #6
0
 public KernelConfig(Index2 gridDimension, Index2 groupDimension)
     : this(gridDimension, groupDimension, 0)
 {
 }
Beispiel #7
0
 public ArrayView3D(ArrayView <T> view, int width, Index2 extent)
     : this(view, new Index3(width, extent))
 {
 }
Beispiel #8
0
 public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, int width, Index2 extent)
     where T : struct =>
 new ArrayView3D <T>(view, width, extent);
Beispiel #9
0
 public ArrayView2D(ArrayView <T> view, Index2 extent)
     : this(new ArrayView <T, Index2>(view, extent))
 {
 }
Beispiel #10
0
 public KernelConfig(Index2 gridDim, Index2 groupDim)
     : this(gridDim, groupDim, default)
 {
 }
Beispiel #11
0
 public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, Index2 extent, int depth)
     where T : struct =>
 new ArrayView3D <T>(view, extent, depth);
Beispiel #12
0
 public static ArrayView2D <T> As2DView <T>(this ArrayView <T> view, Index2 extent)
     where T : unmanaged =>
 new ArrayView2D <T>(view, extent);
Beispiel #13
0
 /// <summary>
 /// Allocates a 2D chunk of shared memory with the specified number of elements.
 /// </summary>
 /// <typeparam name="T">The element type.</typeparam>
 /// <param name="extent">The extent (number of elements to allocate).</param>
 /// <returns>An allocated region of shared memory.</returns>
 public static ArrayView2D <T> Allocate2D <T>(Index2 extent)
     where T : unmanaged =>
 Allocate <T, Index2>(extent);
Beispiel #14
0
 /// <summary>
 /// Allocates a 2D chunk of shared memory with the specified number of elements.
 /// </summary>
 /// <typeparam name="T">The element type.</typeparam>
 /// <param name="extent">The extent (number of elements to allocate).</param>
 /// <returns>An allocated region of shared memory.</returns>
 public static ArrayView2D <T> Allocate2D <T>(Index2 extent)
     where T : struct
 {
     return(new ArrayView2D <T>(Allocate <T, Index2>(extent)));
 }
Beispiel #15
0
 /// <summary>
 /// Constructs a new 3D index.
 /// </summary>
 /// <param name="xy">The x and y indices.</param>
 /// <param name="z">The z index.</param>
 public Index3(Index2 xy, int z)
     : this(xy.X, xy.Y, z)
 {
 }
Beispiel #16
0
 public ArrayView3D(ArrayView <T> view, Index2 extent, int depth)
     : this(view, new Index3(extent, depth))
 {
 }
Beispiel #17
0
 /// <summary>
 /// Constructs a new 3D index.
 /// </summary>
 /// <param name="x">The x index.</param>
 /// <param name="yz">The y and z indices.</param>
 public Index3(int x, Index2 yz)
     : this(x, yz.X, yz.Y)
 {
 }
 /// <summary>
 /// Converts this view into a new 2D view.
 /// </summary>
 /// <param name="extent">The extent.</param>
 /// <returns>The converted 2D view.</returns>
 public ArrayView2D <T> As2DView(Index2 extent)
 {
     return(new ArrayView2D <T>(this, extent));
 }