예제 #1
0
    public unsafe static ArrayPointer <T> GetArrayAligned <T> (this IMemoryManager manager, int count, int alignment)
        where T : unmanaged
    {
        if (count < 1)
        {
            throw new ArgumentOutOfRangeException(nameof(count), "Count must be greater than zero.");
        }

        var mem = manager.GetMemoryAligned <T> (alignment, count);

        return(new ArrayPointer <T> (mem, count));
    }