3 writes to _memoryOffset
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\Tensor.cs (3)
48_memoryOffset = 0; 65_memoryOffset = memoryOffset; 70_memoryOffset = memoryOffset;
13 references to _memoryOffset
System.Numerics.Tensors (13)
System\Numerics\Tensors\netcore\Tensor.cs (6)
72if (_memoryOffset < 0 || (_memoryOffset >= values.Length && values.Length != 0 )) 380return new Tensor<T>(values, [linearLength], _memoryOffset, _isPinned); 403public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _memoryOffset), _lengths, _strides, _values.Length - _memoryOffset); 430public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _memoryOffset), _lengths, _strides, _flattenedLength);
System\Numerics\Tensors\netcore\TensorExtensions.cs (7)
221return new Tensor<T>(input._values, lengths, input._memoryOffset, isPinned: false); 247Tensor<T> output = new Tensor<T>(input._values, lengths, strides, input._memoryOffset); 2663outTensor = new Tensor<T>(values, lengths, Array.Empty<nint>(), tensor._memoryOffset, tensor._isPinned); 2774return new Tensor<T>(tensor._values, arrLengths, strides, tensor._memoryOffset); 2929Tensor<T> output = new Tensor<T>(values, lengths, tensor._memoryOffset, isPinned: false); 3302return new Tensor<T>(tensor._values, lengths, strides, tensor._memoryOffset); 3664return new Tensor<T>(tensor._values, lengths, strides, tensor._memoryOffset);