Rate This Document
Findability
Accuracy
Completeness
Readability

Overview

Compiler automatic vectorization converts the operation of processing one pair of scalars at a time into the operation of parallel processing of multiple pairs of vectors, which can significantly accelerate some program operations with loops. In addition to the preceding interfaces, KML_SVML also provides vectorized interfaces for the compiler. For details, see Table 1 Compiler vectorization interfaces. During compilation, you can add different compilation options for different compilers so that the compiler can automatically call the corresponding vectorization interfaces. For details, see 9.3.2 GCC Vectorization Method and 9.3.3 BiSheng Compiler Vectorization Method.

Table 1 Compiler vectorization interfaces

SVML Interface

MATH Interface

Description

_ZGVnN2v_sin

_ZGVsNxv_sin

_ZGVnN4v_sinf

_ZGVsNxv_sinf

sin

sinf

Sine function

_ZGVnN2v_cos

_ZGVsNxv_cos

_ZGVnN4v_cosf

_ZGVsNxv_cosf

cos

cosf

Cosine function

_ZGVnN2v_tan

_ZGVsNxv_tan

_ZGVnN4v_tanf

_ZGVsNxv_tanf

tan

tanf

Tangent function

_ZGVnN2v_atan

_ZGVsNxv_atan

_ZGVnN4v_atanf

_ZGVsNxv_atanf

atan

atanf

Arctangent function

_ZGVnN2vv_atan2

_ZGVsNxvv_atan2

_ZGVnN4vv_atan2f

_ZGVsNxvv_atan2f

atan2

atan2f

Arctangent function

_ZGVnN2v_sinh

_ZGVsNxv_sinh

_ZGVnN4v_sinhf

_ZGVsNxv_sinhf

sinh

sinhf

Hyperbolic sine function

_ZGVnN2v_cosh

_ZGVsNxv_cosh

_ZGVnN4v_coshf

_ZGVsNxv_coshf

cosh

coshf

Hyperbolic cosine function

_ZGVnN2v_tanh

_ZGVsNxv_tanh

_ZGVnN4v_tanhf

_ZGVsNxv_tanhf

tanh

tanhf

Hyperbolic tangent function

_ZGVnN2v_exp

_ZGVsNxv_exp

_ZGVnN4v_expf

_ZGVsNxv_expf

exp

expf

Exponential function (base e)

_ZGVnN2v_exp2

_ZGVsNxv_exp2

_ZGVnN4v_exp2f

_ZGVsNxv_exp2f

exp2

exp2f

Exponential function (base 2)

_ZGVnN2v_expm1

_ZGVsNxv_expm1

_ZGVnN4v_expm1f

_ZGVsNxv_expm1f

expm1

expm1f

Exponential function (base e-1)

_ZGVnN2v_log

_ZGVsNxv_log

_ZGVsNxv_logf

_ZGVnN4v_logf

log

logf

Logarithmic function (base e)

_ZGVnN2v_log10

_ZGVsNxv_log10

_ZGVnN4v_log10f

_ZGVsNxv_log10f

log10

log10f

Logarithmic function (base 10)

_ZGVnN2v_log1p

_ZGVsNxv_log1p

_ZGVnN4v_log1pf

_ZGVsNxv_log1pf

log1p

log1pf

Logarithmic function (base e)

_ZGVnN2vv_pow

_ZGVsNxvv_pow

_ZGVnN4vv_powf

_ZGVsNxvv_powf

pow

powf

Power function

The preceding interfaces are provided for the compiler. You are not advised to call them directly.