11 writes to _shape
System.Numerics.Tensors (11)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (11)
41_shape = TensorShape.Create(array); 58_shape = TensorShape.Create(array, lengths, strides); 70_shape = TensorShape.Create(array, start, lengths, strides); 80_shape = TensorShape.Create(ref reference, span.Length, pinned: false); 92_shape = TensorShape.Create(ref reference, span.Length, lengths, strides, pinned: false); 102_shape = TensorShape.Create(array); 114_shape = TensorShape.Create(array, start, lengths, strides, out nint linearOffset); 124_shape = TensorShape.Create(data, dataLength); 137_shape = TensorShape.Create(data, dataLength, lengths, strides); 143_shape = TensorShape.Create(ref data, dataLength, lengths, strides, pinned); 150_shape = shape;
57 references to _shape
System.Numerics.Tensors (57)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
453if (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)
156get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 162get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 173public nint FlattenedLength => _shape.FlattenedLength; 176public bool HasAnyDenseDimensions => _shape.HasAnyDenseDimensions; 179public bool IsDense => _shape.IsDense; 182public bool IsEmpty => _shape.IsEmpty; 185public bool IsPinned => _shape.IsPinned; 189public ReadOnlySpan<nint> Lengths => _shape.Lengths; 196public ReadOnlySpan<nint> Strides => _shape.Strides; 201&& left._shape == right._shape; 215new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape); 218public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape); 277if (_shape.FlattenedLength != 0) ret = ref _reference; 304TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 314TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 324TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNRange, NRange>(ranges, out nint linearOffset); 347nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 363nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 493if (_itemsEnumerated == _span._shape.FlattenedLength) 498_linearOffset = _span._shape.AdjustToNextIndex(_span._shape, _linearOffset, _indexes);