10 writes to _shape
System.Numerics.Tensors (10)
System\Numerics\Tensors\netcore\Tensor_1.cs (10)
33_shape = TensorShape.Create(lengths); 42_shape = TensorShape.Create(lengths, strides); 51_shape = TensorShape.Create(array); 60_shape = TensorShape.Create(array, lengths); 69_shape = TensorShape.Create(array, lengths, strides); 78_shape = TensorShape.Create(array, start, lengths, strides); 87_shape = TensorShape.Create(array, start, lengths, strides, linearRankOrder); 98_shape = shape; 109_shape = shape; 118_shape = default;
27 references to _shape
System.Numerics.Tensors (27)
System\Numerics\Tensors\netcore\Tensor.cs (7)
1403newLinearOrder[i] = tensor._shape.LinearRankOrder[tensor.Rank - 1 - i]; 1416newLinearOrder[i] = tensor._shape.LinearRankOrder[dimensions[i]]; 1939strideOrder[index++] = tensor._shape.LinearRankOrder[i]; 1943removed[removedIndex++] = tensor._shape.LinearRankOrder[i]; 1963strideOrder[index++] = tensor._shape.LinearRankOrder[i]; 1967removed = tensor._shape.LinearRankOrder[i]; 2363tensor._shape.LinearRankOrder.CopyTo(strideOrder);
System\Numerics\Tensors\netcore\Tensor_1.cs (20)
34_values = GC.AllocateArray<T>(checked((int)(_shape.LinearLength)), pinned); 43_values = GC.AllocateArray<T>(checked((int)(_shape.LinearLength)), pinned); 128get => ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start + _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 134get => ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start + _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 145public nint FlattenedLength => _shape.FlattenedLength; 147internal bool IsContiguousAndDense => _shape.IsContiguousAndDense; 150public bool IsEmpty => _shape.IsEmpty; 156public ReadOnlySpan<nint> Lengths => _shape.Lengths; 159public int Rank => _shape.Rank; 162public ReadOnlySpan<nint> Strides => _shape.Strides; 178public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape); 190public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape); 234if (_shape.FlattenedLength != 0) ret = ref MemoryMarshal.GetArrayDataReference(_values); 248TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset); 264TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset); 280TensorShape shape = _shape.Slice<TensorShape.GetOffsetAndLengthForNRange, NRange>(ranges, out nint linearOffset); 306var sb = new StringBuilder($"System.Numerics.Tensors.Tensor<{typeof(T).Name}>[{_shape}]"); 411if (_itemsEnumerated == _tensor._shape.FlattenedLength) 416_linearOffset = _tensor._shape.AdjustToNextIndex(_tensor._shape, _linearOffset, _indexes);