[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs element-wise cosine operation.

  • Formula:

    x=[x0,x1,...xn1]y=[y0,y1,...yn1]x = [{x_0}, {x_1}, ... {x_{n-1}}]\\ y = [{y_0}, {y_1}, ... {y_{n-1}}]\\ yi=cos(xi)(i=0,1,...n1){\rm y}_i = \cos(x_i) (i=0,1,...n-1)
  • Example

    1. The input [object Object] is [–1, –2] with dtype [object Object].
    2. Call the [object Object] operator.
    3. The output [object Object] is [0.5403, –0.4161] with dtype [object Object].
[object Object]

Each operator has calls. First, aclnnForeachCosGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnForeachCos is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

    The first-phase API implements input parameter verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • The input value range of [–65504, 65504] satisfies functional precision requirements; precision is not guaranteed for values outside this range.
  • Deterministic computation:
    • aclnnForeachCos defaults to a deterministic implementation.
[object Object]

The following example is for reference only. For details, see .

[object Object]