Developer Reference for Intel® oneAPI Math Kernel Library for C

ID 766684
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

v?Abs

Computes absolute value of vector elements.

Syntax

vsAbs( n, a, y );

vsAbsI(n, a, inca, y, incy);

vmsAbs( n, a, y, mode );

vmsAbsI(n, a, inca, y, incy, mode);

vdAbs( n, a, y );

vdAbsI(n, a, inca, y, incy);

vmdAbs( n, a, y, mode );

vmdAbsI(n, a, inca, y, incy, mode);

vcAbs( n, a, y );

vcAbsI(n, a, inca, y, incy);

vmcAbs( n, a, y, mode );

vmcAbsI(n, a, inca, y, incy, mode);

vzAbs( n, a, y );

vzAbsI(n, a, inca, y, incy);

vmzAbs( n, a, y, mode );

vmzAbsI(n, a, inca, y, incy, mode);

Include Files

  • mkl.h

Input Parameters

Name

Type

Description

n

const MKL_INT

Specifies the number of elements to be calculated.

a

const float* for vsAbs, vmsAbs

const double* for vdAbs, vmdAbs

const MKL_Complex8* for vcAbs, vmcAbs

const MKL_Complex16* for vzAbs, vmzAbs

Pointer to an array that contains the input vector a.

inca, incy

const MKL_INT

Specifies increments for the elements of a and y.

mode

const MKL_INT64

Overrides global VM mode setting for this function call. See vmlSetMode for possible values and their description.

Output Parameters

Name

Type

Description

y

float* for vsAbs, vmsAbs, vcAbs, vmcAbs

double* for vdAbs, vmdAbs, vzAbs, vmzAbs

Pointer to an array that contains the output vector y.

Description

The v?Abs function computes an absolute value of vector elements.

Special Values for Real Function v?Abs(x)
Argument Result Exception
+0 +0  
-0 +0  
+ +  
- +  
QNAN QNAN  
SNAN QNAN INVALID

Specifications for special values of the complex functions are defined according to the following formula

Abs(z) = Hypot(RE(z),IM(z)).