public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, Index2 extent) where T : struct => new ArrayView3D <T>(view, extent.X, extent.Y);
public ArrayView <T> GetRowView(Index2 index) => GetRowView(index.X, index.Y);
public static ArrayView2D <T> As2DView <T>(this ArrayView <T> view, Index2 extent) where T : struct => new ArrayView2D <T>(view, extent);
public ref T this[Index2 xy, int z] => ref this[xy.X, xy.Y, z];
public ref T this[int x, Index2 yz] => ref this[x, yz.X, yz.Y];
public KernelConfig(Index2 gridDimension, Index2 groupDimension) : this(gridDimension, groupDimension, 0) { }
public ArrayView3D(ArrayView <T> view, int width, Index2 extent) : this(view, new Index3(width, extent)) { }
public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, int width, Index2 extent) where T : struct => new ArrayView3D <T>(view, width, extent);
public ArrayView2D(ArrayView <T> view, Index2 extent) : this(new ArrayView <T, Index2>(view, extent)) { }
public KernelConfig(Index2 gridDim, Index2 groupDim) : this(gridDim, groupDim, default) { }
public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, Index2 extent, int depth) where T : struct => new ArrayView3D <T>(view, extent, depth);
public static ArrayView2D <T> As2DView <T>(this ArrayView <T> view, Index2 extent) where T : unmanaged => new ArrayView2D <T>(view, extent);
/// <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);
/// <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))); }
/// <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) { }
public ArrayView3D(ArrayView <T> view, Index2 extent, int depth) : this(view, new Index3(extent, depth)) { }
/// <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)); }