11 writes to _shape
System.Numerics.Tensors (11)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (11)
38_shape = TensorShape.Create(array); 55_shape = TensorShape.Create(array, lengths, strides); 67_shape = TensorShape.Create(array, start, lengths, strides); 77_shape = TensorShape.Create(ref reference, span.Length, pinned: false); 89_shape = TensorShape.Create(ref reference, span.Length, lengths, strides, pinned: false); 99_shape = TensorShape.Create(array); 111_shape = TensorShape.Create(array, start, lengths, strides, out nint linearOffset); 121_shape = TensorShape.Create(data, dataLength); 134_shape = TensorShape.Create(data, dataLength, lengths, strides); 140_shape = TensorShape.Create(ref data, dataLength, lengths, strides, pinned); 147_shape = shape;
57 references to _shape
System.Numerics.Tensors (57)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
450if (TensorShape.AreCompatible(destination._shape, _shape, false))
System\Numerics\Tensors\netcore\Tensor.cs (9)
350Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 373Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 1460TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned); 1593Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 1688&& tensor._shape.LinearLength == other._shape.LinearLength 1690&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape.LinearLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape.LinearLength)); 1910TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned); 2275if (!TensorShape.AreCompatible(destination._shape, tensor._shape, false)) 2352TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (1)
51nint linearOffset = _tensor._shape.GetLinearOffsetForDimension(index, _dimension);
System\Numerics\Tensors\netcore\TensorOperation.cs (24)
20linearOffset = x._shape.AdjustToNextIndex(x._shape, linearOffset, indexes); 96linearOffset = destination._shape.AdjustToNextIndex(destination._shape, linearOffset, indexes); 114xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 115destinationLinearOffset = destination._shape.AdjustToNextIndex(destination._shape, destinationLinearOffset, destinationIndexes); 138nint destinationLinearOffset = destination._shape.LinearLength; 142xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 143destinationLinearOffset = destination._shape.AdjustToPreviousIndex(destination._shape, destinationLinearOffset, destinationIndexes); 203xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 204yLinearOffset = y._shape.AdjustToNextIndex(destination._shape, yLinearOffset, yIndexes); 205destinationLinearOffset = destination._shape.AdjustToNextIndex(destination._shape, destinationLinearOffset, destinationIndexes); 263xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 264destinationLinearOffset = destination._shape.AdjustToNextIndex(destination._shape, destinationLinearOffset, destinationIndexes); 285xLinearOffset = y._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 286destinationLinearOffset = destination._shape.AdjustToNextIndex(destination._shape, destinationLinearOffset, destinationIndexes); 338if (!TensorShape.AreCompatible(destination._shape, x._shape, false)) 347if (TensorShape.AreCompatible(destination._shape, x._shape, false)) 349if (TensorShape.AreCompatible(destination._shape, y._shape, false))
System\Numerics\Tensors\netcore\TensorSpan_1.cs (22)
153get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 159get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 170public nint FlattenedLength => _shape.FlattenedLength; 173public bool HasAnyDenseDimensions => _shape.HasAnyDenseDimensions; 176public bool IsDense => _shape.IsDense; 179public bool IsEmpty => _shape.IsEmpty; 182public bool IsPinned => _shape.IsPinned; 186public ReadOnlySpan<nint> Lengths => _shape.Lengths; 193public ReadOnlySpan<nint> Strides => _shape.Strides; 198&& left._shape == right._shape; 212new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape); 215public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape); 274if (_shape.FlattenedLength != 0) ret = ref _reference; 301TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 311TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 321TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNRange, NRange>(ranges, out nint linearOffset); 344nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 360nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 488if (_itemsEnumerated == _span._shape.FlattenedLength) 493_linearOffset = _span._shape.AdjustToNextIndex(_span._shape, _linearOffset, _indexes);