103 references to GetArrayDataReference
Microsoft.AspNetCore.Http (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
548ref var r = ref MemoryMarshal.GetArrayDataReference(_arrayStorage);
Microsoft.AspNetCore.Shared.Tests (1)
src\Shared\Dictionary\AdaptiveCapacityDictionary.cs (1)
548ref var r = ref MemoryMarshal.GetArrayDataReference(_arrayStorage);
System.Collections (8)
System\Collections\BitArray.cs (8)
136ref byte value = ref Unsafe.As<bool, byte>(ref MemoryMarshal.GetArrayDataReference<bool>(values)); 347ref int left = ref MemoryMarshal.GetArrayDataReference<int>(thisArray); 348ref int right = ref MemoryMarshal.GetArrayDataReference<int>(valueArray); 420ref int left = ref MemoryMarshal.GetArrayDataReference<int>(thisArray); 421ref int right = ref MemoryMarshal.GetArrayDataReference<int>(valueArray); 493ref int left = ref MemoryMarshal.GetArrayDataReference<int>(thisArray); 494ref int right = ref MemoryMarshal.GetArrayDataReference<int>(valueArray); 560ref int value = ref MemoryMarshal.GetArrayDataReference<int>(thisArray);
System.Net.Http (1)
System\Net\Http\Headers\HttpHeaders.cs (1)
1465ref HeaderEntry firstEntry = ref MemoryMarshal.GetArrayDataReference(entries);
System.Net.Primitives (2)
System\Net\IPAddress.cs (2)
212ushorts.StoreUnsafe(ref MemoryMarshal.GetArrayDataReference(numbers)); 356Vector128<ushort> ushorts = Vector128.LoadUnsafe(ref MemoryMarshal.GetArrayDataReference(numbers));
System.Numerics.Tensors (8)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (1)
106_reference = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */);
System\Numerics\Tensors\netcore\Tensor.cs (4)
379public static implicit operator TensorSpan<T>(Tensor<T> value) => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value._flattenedLength); 384public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value.FlattenedLength); 390public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths, _strides, _flattenedLength); 417public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths, _strides, _flattenedLength);
System\Numerics\Tensors\netcore\TensorShape.cs (2)
55: MemoryMarshal.CreateReadOnlySpan(ref MemoryMarshal.GetArrayDataReference(_metadata), _rank); 60: MemoryMarshal.CreateReadOnlySpan(ref MemoryMarshal.GetArrayDataReference(_metadata), _rank * 2).Slice(_rank);
System\Numerics\Tensors\netcore\TensorSpan.cs (1)
108_reference = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */);
System.Private.CoreLib (79)
src\libraries\System.Private.CoreLib\src\System\Array.cs (18)
63ref MemoryMarshal.GetArrayDataReference(newArray), 64ref MemoryMarshal.GetArrayDataReference(larray), 1125ref T first = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)startIndex); 1515ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1523ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1531ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1539ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), startIndex), 1760ref Unsafe.Add(ref Unsafe.As<T, byte>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 1770ref Unsafe.Add(ref Unsafe.As<T, short>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 1780ref Unsafe.Add(ref Unsafe.As<T, int>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 1790ref Unsafe.Add(ref Unsafe.As<T, long>(ref MemoryMarshal.GetArrayDataReference(array)), endIndex), 1893SpanHelpers.Reverse(ref MemoryMarshal.GetArrayDataReference(array), (nuint)array.Length); 1910SpanHelpers.Reverse(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), (nuint)length); 2111var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length); 2160var span = new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index), length); 2184var spanKeys = new Span<TKey>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(keys), index), length); 2185var spanItems = new Span<TValue>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(items), index), length); 2202var span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(array), array.Length);
src\libraries\System.Private.CoreLib\src\System\Buffers\SharedArrayPool.cs (1)
408Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(arrays), count) = array; // arrays[count] = array, but avoiding stelemref
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (3)
38return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */), array.Length - start); 62return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)actualIndex /* force zero-extension */), array.Length - actualIndex); 86return new Span<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */), length);
src\libraries\System.Private.CoreLib\src\System\Number.Formatting.cs (2)
1582ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(typeof(TChar) == typeof(char) ? TwoDigitsCharsAsBytes : TwoDigitsBytes), (uint)sizeof(TChar) * 2 * value), 1598ref byte charsArray = ref MemoryMarshal.GetArrayDataReference(typeof(TChar) == typeof(char) ? TwoDigitsCharsAsBytes : TwoDigitsBytes);
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (3)
875ref uint lookupTable = ref MemoryMarshal.GetArrayDataReference(s_crcTable); 883ref uint lookupTable = ref MemoryMarshal.GetArrayDataReference(s_crcTable); 894ref uint lookupTable = ref MemoryMarshal.GetArrayDataReference(s_crcTable);
src\libraries\System.Private.CoreLib\src\System\Random.cs (1)
352Shuffle(new Span<T>(ref MemoryMarshal.GetArrayDataReference(values), values.Length));
src\libraries\System.Private.CoreLib\src\System\ReadOnlySpan.cs (3)
47_reference = ref MemoryMarshal.GetArrayDataReference(array); 81_reference = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */); 399Buffer.Memmove(ref MemoryMarshal.GetArrayDataReference(destination), ref _reference, (uint)_length);
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeHelpers.cs (2)
63ref MemoryMarshal.GetArrayDataReference(dest), 64ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), offset),
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CollectionsMarshal.cs (1)
38span = new Span<T>(ref MemoryMarshal.GetArrayDataReference(items), size);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (1)
178void* pRawData = Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(arr));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
201return ref MemoryMarshal.GetArrayDataReference(array);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (1)
88return Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(hashEntries), (nuint)offset) == value;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\AhoCorasick.cs (2)
81ref AhoCorasickNode nodes = ref MemoryMarshal.GetArrayDataReference(_nodes); 186ref AhoCorasickNode nodes = ref MemoryMarshal.GetArrayDataReference(_nodes);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
129ref string[]? bucketsRef = ref MemoryMarshal.GetArrayDataReference(_buckets);
src\libraries\System.Private.CoreLib\src\System\Span.cs (3)
49_reference = ref MemoryMarshal.GetArrayDataReference(array); 86_reference = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), (nint)(uint)start /* force zero-extension */); 429Buffer.Memmove(ref MemoryMarshal.GetArrayDataReference(destination), ref _reference, (uint)_length);
src\libraries\System.Private.CoreLib\src\System\String.cs (5)
87source: ref MemoryMarshal.GetArrayDataReference(value)); 113source: ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(value), startIndex)); 428destination: ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(destination), destinationIndex), 473destination: ref MemoryMarshal.GetArrayDataReference(chars), 497destination: ref MemoryMarshal.GetArrayDataReference(chars),
src\libraries\System.Private.CoreLib\src\System\Text\DecoderNLS.cs (5)
61fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 106fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 107fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars)) 157fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 158fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars))
src\libraries\System.Private.CoreLib\src\System\Text\EncoderNLS.cs (5)
57fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars)) 96fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars)) 97fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 143fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars)) 144fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes))
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (4)
341ref MemoryMarshal.GetArrayDataReference(sourceArray), 1088Append(ref MemoryMarshal.GetArrayDataReference(value), value.Length); 1339Insert(index, ref MemoryMarshal.GetArrayDataReference(value), value.Length); 2277ref char destination = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(chunkChars), chunkLength);
src\libraries\System.Private.CoreLib\src\System\Text\UnicodeEncoding.cs (3)
158fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 201fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 293fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars))
src\libraries\System.Private.CoreLib\src\System\Text\UTF32Encoding.cs (3)
166fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 209fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 301fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars))
src\libraries\System.Private.CoreLib\src\System\Text\UTF7Encoding.cs (3)
202fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 245fixed (byte* pBytes = &MemoryMarshal.GetArrayDataReference(bytes)) 337fixed (char* pChars = &MemoryMarshal.GetArrayDataReference(chars))
src\System\Buffer.CoreCLR.cs (1)
34Memmove(ref *(pDest + (uint)destIndex), ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(src), (nint)(uint)srcIndex /* force zero-extension */), (uint)len);
src\System\Runtime\CompilerServices\CastHelpers.cs (2)
397ref object? element = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index); 414ref object? element = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(array), index);
src\System\Runtime\CompilerServices\StaticsHelpers.cs (1)
183object? threadStaticObjectNonCollectible = Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(t_ThreadStatics->NonCollectibleTlsArrayData), indexOffset - ThreadLocalData.NUMBER_OF_TLSOFFSETS_NOT_USED_IN_NONCOLLECTIBLE_ARRAY);
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
23ref GetArrayDataReference(array);
src\System\StubHelpers.cs (3)
111SpanHelpers.Memmove(ref *pbNativeBuffer, ref MemoryMarshal.GetArrayDataReference(bytes), (nuint)nb); 368SpanHelpers.Memmove(ref *pNative, ref MemoryMarshal.GetArrayDataReference(bytes), (nuint)nbytesused); 417SpanHelpers.Memmove(ref *(byte*)bstr, ref MemoryMarshal.GetArrayDataReference(bytes), length);
System.Private.DataContractSerialization (2)
System\Xml\XmlBinaryWriter.cs (2)
110ref byte bytePtr = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(buffer), offset); 125ref byte bytePtr = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(buffer), offset);
System.Text.Encoding.CodePages (1)
System\Text\CodePagesEncodingProvider.cs (1)
201MemoryMarshal.GetArrayDataReference(array);