コード例 #1
0
        private Array ReadNativeArrayUnsafe <T>(long byteIndex, int length)
        {
            T[] array = new T[length];
            UnsafeArrayReader <T> .ReadArray(View, byteIndex, array, 0, length);

            return(array);
        }
コード例 #2
0
        // Map from the memory mapped file
        internal void UnsafeFastGetRowRange <T>(long translatedRowIndex, long translatedColumnIndex, T[] array, int destinationIndex, int length)
        {
            var columnMetadata = Metadata.Columns[translatedColumnIndex];
            var entrySize      = columnMetadata.Type.GetAlignment();
            var dataStart      = columnMetadata.DataOffset;
            var byteOffset     = translatedRowIndex * entrySize;

            var byteIndex = dataStart + byteOffset;

            UnsafeArrayReader <T> .ReadArray(View, byteIndex, array, 0, length);
        }