TensorPrimitives.SinCos<T> 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.
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
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.