Tensor.CreateFromShapeUninitialized Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateFromShapeUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean) |
Creates a new tensor with the specified lengths and strides. |
CreateFromShapeUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean) |
Creates a new tensor with the specified lengths and strides. If |
CreateFromShapeUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.cs
Creates a new tensor with the specified lengths and strides.
public static System.Numerics.Tensors.Tensor<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<IntPtr> lengths, bool pinned = false);
static member CreateFromShapeUninitialized : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateFromShapeUninitialized(Of T) (lengths As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- lengths
-
ReadOnlySpan<nativeint>
The lengths of each dimension.
- pinned
- Boolean
true
to pin the underlying buffer. The default is false
.
Returns
Applies to
CreateFromShapeUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)
- Source:
- Tensor.cs
Creates a new tensor with the specified lengths and strides. If pinned
is true the underlying buffer is created permanently pinned, otherwise the underlying buffer is not pinned. The underlying buffer is not initialized.
public static System.Numerics.Tensors.Tensor<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool pinned = false);
static member CreateFromShapeUninitialized : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateFromShapeUninitialized(Of T) (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)
Type Parameters
- T
Parameters
- lengths
-
ReadOnlySpan<nativeint>
The lengths of each dimension.
- strides
-
ReadOnlySpan<nativeint>
The strides of each dimension.
- pinned
- Boolean
true
to pin the underlying buffer. The default is false
.