Del via


Tensor.CreateUninitialized Method

Definition

Overloads

CreateUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Creates a Tensor<T> and does not initialize it. If pinned is true, the memory will be pinned.

CreateUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean)

Creates a Tensor<T> and does not initialize it. If pinned is true, the memory will be pinned.

CreateUninitialized<T>(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.Factory.cs

Creates a Tensor<T> and does not initialize it. If pinned is true, the memory will be pinned.

public static System.Numerics.Tensors.Tensor<T> CreateUninitialized<T> (scoped ReadOnlySpan<IntPtr> lengths, scoped ReadOnlySpan<IntPtr> strides, bool pinned = false);
static member CreateUninitialized : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateUninitialized(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<IntPtr>

ReadOnlySpan<nativeint>

A ReadOnlySpan<T> indicating the lengths of each dimension.

strides

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

A ReadOnlySpan<T> indicating the strides of each dimension.

pinned
Boolean

A Boolean whether the underlying data should be pinned or not.

Returns

Applies to

CreateUninitialized<T>(ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.Factory.cs

Creates a Tensor<T> and does not initialize it. If pinned is true, the memory will be pinned.

public static System.Numerics.Tensors.Tensor<T> CreateUninitialized<T> (scoped ReadOnlySpan<IntPtr> lengths, bool pinned = false);
static member CreateUninitialized : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
Public Function CreateUninitialized(Of T) (lengths As ReadOnlySpan(Of IntPtr), Optional pinned As Boolean = false) As Tensor(Of T)

Type Parameters

T

Parameters

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

A ReadOnlySpan<T> indicating the lengths of each dimension.

pinned
Boolean

A Boolean whether the underlying data should be pinned or not.

Returns

Applies to