Developer Reference for Intel® oneAPI Math Kernel Library for C
v?Log2
Computes the base 2 logarithm of vector elements.
Syntax
vhLog2 ( n , a , y );
vhLog2I(n, a, inca, y, incy);
vmhLog2 ( n , a , y , mode );
vmhLog2I(n, a, inca, y, incy, mode);
vsLog2 ( n , a , y );
vsLog2I(n, a, inca, y, incy);
vmsLog2 ( n , a , y , mode );
vmsLog2I(n, a, inca, y, incy, mode);
vdLog2 ( n , a , y );
vdLog2I(n, a, inca, y, incy);
vmdLog2 ( n , a , y , mode );
vmdLog2I(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 _Float16* for vhLog2 const float* for vsLog2 const _Float16* for vmhLog2 const float* for vmsLog2 const double* for vdLog2 const double* for vmdLog2 |
Pointer to the array containing the input vector a . |
inca , incy |
const MKL_INT |
Specifies increments for the elements of a and y . |
mode |
const MKL_INT64 |
Overrides the global VM mode setting for this function call. See vmlSetMode (Sets a new mode for VM functions according to the mode parameter and stores the previous VM mode to oldmode.) for possible values and their description. |
Output Parameters
Name |
Type |
Description |
|---|---|---|
y |
_Float16* for vhLog2 float* for vsLog2 _Float16* for vmhLog2 float* for vmsLog2 double* for vdLog2 double* for vmdLog2 |
Pointer to an array containing the output vector y . |
Description
The v?Log2 function computes the base 2 logarithm of vector elements.
See Special Value Notations for the conventions used in this table:
Special values for Real Function v?Log2(x)
Argument |
Result |
VM Error Status |
Exception |
|---|---|---|---|
+1 |
+0 |
||
x < +0 |
QNAN |
VML_STATUS_ERRDOM |
INVALID |
+0 |
|
VML_STATUS_SING |
ZERODIVIDE |
-0 |
|
VML_STATUS_SING |
ZERODIVIDE |
|
QNAN |
VML_STATUS_ERRDOM |
INVALID |
|
|
||
QNAN |
QNAN |
||
SNAN |
QNAN |
INVALID |