15 writes to _shape
System.Numerics.Tensors (15)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (11)
40_shape = TensorShape.Create(array); 75_shape = TensorShape.Create(array, lengths, strides); 99_shape = TensorShape.Create(array, start, lengths, strides); 111_shape = TensorShape.Create(ref reference, span.Length, pinned: false); 141_shape = TensorShape.Create(ref reference, span.Length, lengths, strides, pinned: false); 153_shape = TensorShape.Create(array); 180_shape = TensorShape.Create(array, start, lengths, strides, out nint linearOffset); 195_shape = TensorShape.Create(data, dataLength); 234_shape = TensorShape.Create(data, dataLength, lengths, strides); 240_shape = TensorShape.Create(in data, dataLength, lengths, strides, pinned); 247_shape = shape;
System\Numerics\Tensors\netcore\TensorOperation.cs (4)
34ref readonly TensorShape destinationShape = ref ((x._shape.FlattenedLength > y._shape.FlattenedLength) ? ref x._shape : ref y._shape); 226ref readonly TensorShape destinationShape = ref ((x._shape.FlattenedLength > y._shape.FlattenedLength) ? ref x._shape : ref y._shape);
60 references to _shape
System.Numerics.Tensors (60)
System\Numerics\Tensors\netcore\ReadOnlyTensorDimensionSpan_1.cs (1)
51nint linearOffset = _tensor._shape.GetLinearOffsetForDimension(index, _dimension);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (23)
253get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 259get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 269public nint FlattenedLength => _shape.FlattenedLength; 272public bool HasAnyDenseDimensions => _shape.HasAnyDenseDimensions; 275public bool IsDense => _shape.IsDense; 278public bool IsEmpty => _shape.IsEmpty; 281public bool IsPinned => _shape.IsPinned; 285public ReadOnlySpan<nint> Lengths => _shape.Lengths; 292public ReadOnlySpan<nint> Strides => _shape.Strides; 301&& left._shape == right._shape; 325items._shape 378if (_shape.FlattenedLength != 0) ret = ref _reference; 405TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 415TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 425TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNRange, NRange>(ranges, out nint linearOffset); 450if (TensorShape.AreCompatible(destination._shape, _shape, false)) 461if (_shape.FlattenedLength <= destination.Length) 473nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 489nint longestContiguousLength = _shape.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 560if (_itemsEnumerated == _span._shape.FlattenedLength) 565_linearOffset = _span._shape.AdjustToNextIndex(_span._shape, _linearOffset, _indexes);
System\Numerics\Tensors\netcore\Tensor.cs (4)
1603ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned); 2106ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned); 2404if (!TensorShape.AreCompatible(destination._shape, tensor._shape, false)) 2518ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorOperation.cs (32)
34ref readonly TensorShape destinationShape = ref ((x._shape.FlattenedLength > y._shape.FlattenedLength) ? ref x._shape : ref y._shape); 40xLinearOffset = x._shape.AdjustToNextIndex(destinationShape, xLinearOffset, xIndexes); 41yLinearOffset = y._shape.AdjustToNextIndex(destinationShape, yLinearOffset, yIndexes); 70xLinearOffset = x._shape.AdjustToNextIndex(x._shape, xLinearOffset, xIndexes); 114xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 142xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 164xLinearOffset = x._shape.AdjustToNextIndex(x._shape, xLinearOffset, xIndexes); 183xLinearOffset = x._shape.AdjustToNextIndex(x._shape, xLinearOffset, xIndexes); 203xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 204yLinearOffset = y._shape.AdjustToNextIndex(destination._shape, yLinearOffset, yIndexes); 226ref readonly TensorShape destinationShape = ref ((x._shape.FlattenedLength > y._shape.FlattenedLength) ? ref x._shape : ref y._shape); 233xLinearOffset = x._shape.AdjustToNextIndex(destinationShape, xLinearOffset, xIndexes); 234yLinearOffset = y._shape.AdjustToNextIndex(destinationShape, yLinearOffset, yIndexes); 263xLinearOffset = x._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 285xLinearOffset = y._shape.AdjustToNextIndex(destination._shape, xLinearOffset, xIndexes); 306xLinearOffset = x._shape.AdjustToNextIndex(x._shape, xLinearOffset, xIndexes); 324if (!TensorShape.AreCompatible(lengths, x._shape)) 331if (!TensorShape.AreCompatible(x._shape, y._shape, true)) 338if (!TensorShape.AreCompatible(destination._shape, x._shape, false)) 345if (TensorShape.AreCompatible(x._shape, y._shape, true)) 347if (TensorShape.AreCompatible(destination._shape, x._shape, false)) 349if (TensorShape.AreCompatible(destination._shape, y._shape, false)) 362if (TensorShape.AreCompatible(x._shape, y._shape, true))