cos function

VARP cos(
  1. VARP x
)

Computes cos of x element-wise.

Given an input variable, this function computes cosine of every element in the variable. Input range is (-inf, inf) and output range is -1,1. If input lies outside the boundary, nan is returned.

Args:

  • x: A variable. Must be one of the following types: Halide_Type_Float

Returns:

  • A variable. Has the same type as x.

Implementation

VARP cos(VARP x) => VARP.fromPointer(C.mnn_expr_Cos(x.ptr));