/// <summary> /// Converts this view into a new 3D view. /// </summary> /// <param name="extent">The extent.</param> /// <returns>The converted 3D view.</returns> public ArrayView3D <T> As3DView(Index3 extent) { return(new ArrayView3D <T>(this, extent)); }
/// <summary> /// Allocates a 3D chunk of local 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 local memory.</returns> public static ArrayView3D <T> Allocate3D <T>(Index3 extent) where T : unmanaged => Allocate <T, Index3>(extent);
public ArrayView3D(ArrayView <T> view, Index3 extent) : this(new ArrayView <T, Index3>(view, extent)) { }
/// <summary> /// Allocates a 3D 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 ArrayView3D <T> Allocate3D <T>(Index3 extent) where T : struct => new ArrayView3D <T>(Allocate <T, Index3>(extent));
public static ArrayView3D <T> As3DView <T>(this ArrayView <T> view, Index3 extent) where T : struct => new ArrayView3D <T>(view, extent);