Computes a value rounded to the nearest integer for each vector element.
Fortran:
call vsround( n, a, y )
call vdround( n, a, y )
C:
vsRound( n, a, y );
vdRound( n, a, y );
The FORTRAN 77 interfaces are specified in the mkl_vml.f77 include file, the Fortran 90 interfaces are specified in the mkl_vml.f90 include file, and the C interfaces are specified in the mkl_vml_functions.h include file.
Name |
Type |
Description |
---|---|---|
n |
FORTRAN 77: INTEGER Fortran 90: INTEGER, INTENT(IN) C: const int |
Specifies the number of elements to be calculated. |
a |
FORTRAN 77: REAL for vsround DOUBLE PRECISION for vdround Fortran 90: REAL, INTENT(IN) for vsround DOUBLE PRECISION, INTENT(IN) for vdround C: const float* for vsRound const double* for vdRound |
FORTRAN: Array that specifies the input vector a. C: Pointer to an array that contains the input vector a. |
Name |
Type |
Description |
---|---|---|
y |
FORTRAN 77: REAL for vsround DOUBLE PRECISION for vdround Fortran 90: REAL, INTENT(OUT) for vsround DOUBLE PRECISION, INTENT(OUT) for vdround C: float* for vsRound double* for vdRound |
FORTRAN: Array that specifies the output vector y. C: Pointer to an array that contains the output vector y. |
The function computes a value rounded to the nearest integer for each vector element.
The resulting mode affects the results computed for inputs that fall half-way between consecutive integres. For example:
f(0.5) = 0, for rounding modes set to round to nearest round toward zero or to minus infinity.
f(0.5) = 1, for rounding modes set to plus infinity.
f(-1.5) = -2, for rounding modes set to round to nearest or to minus infinity.
f(-1.5) = -1, for rounding modes set to round toward zero or to plus infinity.
Copyright © 1994 - 2011, Intel Corporation. All rights reserved.