Share via


TensorPrimitives.SinCos<T> Method

Definition

Computes the element-wise sine and cosine of the value in the specified tensor.

public:
generic <typename T>
 where T : System::Numerics::ITrigonometricFunctions<T> static void SinCos(ReadOnlySpan<T> x, Span<T> sinDestination, Span<T> cosDestination);
public static void SinCos<T> (ReadOnlySpan<T> x, Span<T> sinDestination, Span<T> cosDestination) where T : System.Numerics.ITrigonometricFunctions<T>;
static member SinCos : ReadOnlySpan<'T (requires 'T :> System.Numerics.ITrigonometricFunctions<'T>)> * Span<'T (requires 'T :> System.Numerics.ITrigonometricFunctions<'T>)> * Span<'T (requires 'T :> System.Numerics.ITrigonometricFunctions<'T>)> -> unit (requires 'T :> System.Numerics.ITrigonometricFunctions<'T>)
Public Shared Sub SinCos(Of T As ITrigonometricFunctions(Of T)) (x As ReadOnlySpan(Of T), sinDestination As Span(Of T), cosDestination As Span(Of T))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

sinDestination
Span<T>

The destination tensor for the element-wise sine result, represented as a span.

cosDestination
Span<T>

The destination tensor for the element-wise cosine result, represented as a span.

Exceptions

x and sinDestination or cosDestination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes (sinDestination[i], cosDestination[i]) = T.SinCos(x[i]).

This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures.

Applies to