TensorPrimitives.ConvertToSingle 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.
Copies source
to destination
, converting each half-precision
floating-point value to its nearest representable Single value.
public:
static void ConvertToSingle(ReadOnlySpan<Half> source, Span<float> destination);
public static void ConvertToSingle(ReadOnlySpan<Half> source, Span<float> destination);
static member ConvertToSingle : ReadOnlySpan<Half> * Span<single> -> unit
Public Shared Sub ConvertToSingle (source As ReadOnlySpan(Of Half), destination As Span(Of Single))
Parameters
- source
- ReadOnlySpan<Half>
The source span from which to copy values.
Exceptions
Destination is too short.
Remarks
This method effectively computes
.destination
[i] = (float)source
[i]
source
and destination
must not overlap. If they do, behavior is undefined.
Applies to
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.