แชร์ผ่าน


Tensor<T>.ITensor<Tensor<T>,T>.Create Method

Definition

Overloads

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, Boolean)

Creates a Tensor<T> and initializes it with the default value of T. If pinned is true, the memory will be pinned.

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Creates a Tensor<T> and initializes it with the default value of T. If pinned is true, the memory will be pinned.

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.cs
Source:
Tensor.cs

Creates a Tensor<T> and initializes it with the default value of T. If pinned is true, the memory will be pinned.

 static System::Numerics::Tensors::Tensor<T> ^ System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create(ReadOnlySpan<IntPtr> lengths, bool pinned) = System::Numerics::Tensors::ITensor<System::Numerics::Tensors::Tensor<T> ^, T>::Create;
static System.Numerics.Tensors.Tensor<T> ITensor<Tensor<T>,T>.Create (ReadOnlySpan<IntPtr> lengths, bool pinned);
static member System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
 Shared Function Create (lengths As ReadOnlySpan(Of IntPtr), pinned As Boolean) As Tensor(Of T) Implements ITensor(Of Tensor(Of T), T).Create

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

Implements

Applies to

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.cs
Source:
Tensor.cs

Creates a Tensor<T> and initializes it with the default value of T. If pinned is true, the memory will be pinned.

 static System::Numerics::Tensors::Tensor<T> ^ System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create(ReadOnlySpan<IntPtr> lengths, ReadOnlySpan<IntPtr> strides, bool pinned) = System::Numerics::Tensors::ITensor<System::Numerics::Tensors::Tensor<T> ^, T>::Create;
static System.Numerics.Tensors.Tensor<T> ITensor<Tensor<T>,T>.Create (ReadOnlySpan<IntPtr> lengths, ReadOnlySpan<IntPtr> strides, bool pinned);
static member System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
 Shared Function Create (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), pinned As Boolean) As Tensor(Of T) Implements ITensor(Of Tensor(Of T), T).Create

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

Implements

Applies to