Share via


TensorPrimitives.SinCosPi<T> Method

Definition

Computes the element-wise sine and cosine of the value in the specified tensor that has been multiplied by Pi.

public:
generic <typename T>
 where T : System::Numerics::ITrigonometricFunctions<T> static void SinCosPi(ReadOnlySpan<T> x, Span<T> sinPiDestination, Span<T> cosPiDestination);
public static void SinCosPi<T> (ReadOnlySpan<T> x, Span<T> sinPiDestination, Span<T> cosPiDestination) where T : System.Numerics.ITrigonometricFunctions<T>;
static member SinCosPi : 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 SinCosPi(Of T As ITrigonometricFunctions(Of T)) (x As ReadOnlySpan(Of T), sinPiDestination As Span(Of T), cosPiDestination As Span(Of T))

Type Parameters

T

Parameters

x
ReadOnlySpan<T>

The tensor, represented as a span.

sinPiDestination
Span<T>

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

cosPiDestination
Span<T>

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

Exceptions

x and sinPiDestination or cosPiDestination reference overlapping memory locations and do not begin at the same location.

Remarks

This method effectively computes (sinPiDestination[i], cosPiDestination[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