Home
Libdevice User's Guide
Contents
1. Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 186 __nv_int2float_rz Prototype close C my aime Preteens ie i52 im Description Convert the signed integer value x to a single precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 99 Function Reference 3 187 nv_int_as float Prototype PESA Q my iot asg loet L2 Sx Description Reinterpret the bits in the signed integer value x as a single precision floating point value Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 188 __nv_isfinited Prototype 132 nv isfinited double x Description Determine whether the floating point value x is a finite value zero subnormal or normal and not infinity or NaN Returns Returns a nonzero value if and only if x is a finite value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 189 nv_isinfd Prototype www nvidia com Libdevice User s Guide Part 000 _v5 5 100 Function Reference 132 nv isinfd double x Description Determine whether the floating point value x is an infinite value positive or negative Returns Returns a nonzero value if and only if
2. Compute the reciprocal of x in round towards zero mode Returns Returns J For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 87 Function Reference Compute 3 5 Yes 3 164 __nv_frexp Prototype double in rresp double S72 ob Description Decompose the floating point value x into a component m for the normalized fraction element and another term n for the exponent The absolute value of m will be greater than or equal to 0 5 and less than 1 0 or it will be equal to 0 x m 2 The integer exponent n will be stored in the location to which nptr points Returns Returns the fractional component m gt _ nv frexp 0 nptr returns 0 for the fractional component and zero for the integer component gt _ nv frexp 0 nptr returns 0 and stores zero in the location pointed to by nptr gt _ nv frexp 0 nptr retums and stores an unspecified value in the location to which nptr points gt _ nv frexp NaN y returns a NaN and stores an unspecified value in the location to which nptr points For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 165 __ nv_frexpf Prototype float nv frexpf float x 132
3. Function Reference gt _ nv fabsf returns oo gt __nv_fabsf 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 96 __nv_fadd_rd Prototype logre my tace melo es loew es Description Compute the sum of x and y in round down to negative infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 97 nv_fadd_rn Prototype float nv fadd rn float x float y Description Compute the sum of x and y in round to nearest even rounding mode www nvidia com Libdevice User s Guide Part 000 _v5 5 52 Function Reference Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 98 nv _fadd ru Prototype A exp A Description Compute the sum of x and y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C
4. Prototype 164 nv_umul64hi i64 x 164 y Description Calculate the most significant 64 bits of the 128 bit product x y where x and y are 64 bit unsigned integers Returns Returns the most significant 64 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 311 _ nv_umulhi Prototype 132 nv_umulhi i32 x 132 y Description Calculate the most significant 32 bits of the 64 bit product x y where x and y are 32 bit unsigned integers Returns Returns the most significant 32 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 163 Function Reference 3 312 nv_urhadd Prototype 132 A nv urhadd 232 sx 132 cy Description Compute average of unsigned input arguments x and y as x y 1 gt gt 1 avoiding overflow in the intermediate sum Returns Returns an unsigned integer value representing the unsigned rounded average value of the two inputs Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 313 __nv_usad Prototype 12 VS EA LOA Syp 192 Za Description Calculate x y z the 32 bit sum of the third argument z plus and the absolute value of the difference between the first argument x and second argument y Inputs x y and z are unsigned 32 bit integers Returns Returns
5. n x returns NaN for n lt 0 n 0 returns oo n 00 returns 0 n NaN returns NaN vy vV v v yv nv_yn nv_yn __nv_yn n x returns NaN for x lt 0 nv_yn nv_yn For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 167 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 319 __nv_ynf Prototype float Q nv_ynf i32 n float x Description Calculate the value of the Bessel function of the second kind of order n for the input argument x Y AX Returns Returns the value of the Bessel function of the second kind of order n gt _ nv _ynf n x returns NaN for n lt 0 gt __nv_ynf n 0 returns oo gt __nv_ynf n x returns NaN for x lt 0 gt _ nv _ynf n returns 0 gt _ nv _ynf n NaN returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 168 Notice ALL NVIDIA DESIGN SPECIFICATIONS REFERENCE BOARDS FILES DRAWINGS DIAGNOSTICS LISTS AND OTHER DOCUMENTS TOGETHER AND SEPARATELY MATERIALS ARE BEING PROVIDED AS IS NVIDIA MAKES NO WARRANTIES EXPRESSED IMPLIED STATUTORY OR OTHERWISE WITH RESPECT TO THE
6. Prototype 132 nv signbitd double x Description Determine whether the floating point value x is negative Returns Returns a nonzero value if and only if x is negative Reports the sign bit of all values including infinities zeros and NaNs Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 270 _ nv_signbitf Prototype SN VS no lo is Description Determine whether the floating point value x is negative Returns Returns a nonzero value if and only if x is negative Reports the sign bit of all values including infinities zeros and NaNs Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 143 Function Reference Compute 3 5 Yes 3 271 __nv_sin Prototype double nv sin double x Description Calculate the sine of the input argument x measured in radians Returns __nv_sin 0 returns 0 gt _ nv_sin returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 272 nv_sincos Prototype voici Q my Stacos Corola vern Goubile lt Spine Cerios sepia Description Calculate the sine and cosine of the first input argument x measured in radians The results for sine and cosine are written into the second argument sptr and respectively th
7. _ nv_erfe returns 2 gt _ nv_erfe 00 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 78 nv_erfcf Prototype float nv erfef float x Description Calculate the complementary error function of the input argument x 1 erf x www nvidia com Libdevice User s Guide Part 000 _v5 5 42 Function Reference Returns gt _ nv_erfef co returns 2 gt _ nv_erfcf co returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 79 __nv_erfcinv Prototype double nv erfcinv double x Description Calculate the inverse complementary error function of the input argument y for y in the interval 0 2 The inverse complementary error function find the value x that satisfies the equation y erfc x for 0 lt y lt 2 and oo lt x lt o00 Returns gt _ nv _erfcinv 0 returns gt _ nv_erfcinv 2 returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 80 __nv_erfcinvf Prototype lose E my Grreimys Eloet wz www nvidia com Libdevice User s Gu
8. nv ull2double rn i64 1 Description Convert the unsigned 64 bit integer value x to a double precision floating point value in round to nearest even mode Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 157 Function Reference Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 299 nv _ull2double_ ru Prototype double nv ull2double ru i64 1 Description Convert the unsigned 64 bit integer value x to a double precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 300 nv_ull2double_rz Prototype double nv ull2double rz i64 1 Description Convert the unsigned 64 bit integer value x to a double precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 158 Function Reference Compute 3 5 Yes 3 301 nv_ull2float_rd Prototype float C nv ull2float rd 164 1 Description Convert the unsigned integer value x to a single precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 302 _ nv_ull2float_r
9. 1 1 gt _ nv_asin 0 returns 0 gt _ nv_asin x returns NaN for x outside 1 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 7 __nv_asinf Prototype float nv asinf float x Description Calculate the principal value of the arc sine of the input argument x Returns Result will be in radians in the interval Tr 2 Tr 2 for x inside 1 1 gt _ nv_asinf 0 returns 0 gt _ nv_asinf x returns NaN for x outside 1 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 7 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 8 __nv_asinh Prototype double nv asinh double x Description Calculate the arc hyperbolic sine of the input argument x Returns gt _ nv_asinh 0 returns 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 9 __nv_asinhf Prototype float nv asinhf float x Description Calculate the arc hyperbolic sine of the input argument x Returns gt __nv_asinh 0 returns 1 For accuracy information for this functio
10. Calculate the arc hyperbolic tangent of the input argument x Returns gt _ nv_atanhf 0 returns 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 11 Function Reference gt _ nv_atanhf 1 returns gt _ nv_atanhf x returns NaN for x outside interval 1 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 16 __ nv_brev Prototype 132 nv_brev i32 x Description Reverses the bit order of the 32 bit unsigned integer x Returns Returns the bit reversed value of x i e bit N of the return value corresponds to bit 31 N of x Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 17 __nv_brevll Prototype 164 nv _brevll i64 x Description Reverses the bit order of the 64 bit unsigned integer x Returns Returns the bit reversed value of x i e bit N of the return value corresponds to bit 63 N of x www nvidia com Libdevice User s Guide Part 000 _v5 5 12 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 18 __nv_byte_perm Prototype 132 Q ny oyto perm sz ox LIA Y L92 GA Description __nv_byte_perm x y s returns a 32 bit integer consisting of four bytes from eight input bytes provided in the two input integers x and y as specified by a selector s
11. Convert the signed integer value x to a single precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 208 __nv_ll2float_rn Prototype logs my lll a i Gall Description Convert the signed 64 bit integer value x to a single precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 110 Function Reference 3 209 _ nv _llfloat_ru Prototype float nv 112float ru i64 1 Description Convert the signed integer value x to a single precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 210 nv _llfloat_rz Prototype ilce U my lo atrio 1 Description Convert the signed integer value x to a single precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 211 nv _llabs Prototype 164 nv llabs 164 x www nvidia com Libdevice User s Guide Part 000 _v5 5 111 Function Reference Description Determine the absolute value of the 64 bit si
12. The input bytes are indexed as follows input 0 x lt 7 0 gt amos Lil lo gt ome 21 x223 16 gt imovel x lt 3l 24 gt input 4 y lt 7 0 gt input 5 y lt 15 8 gt input 6 y lt 23 16 gt input 7 y lt 31 24 gt The selector indices are as follows the upper 16 bits of the selector are not used selector 0 s lt 2 0 gt selector 1 s lt 6 4 gt selector 2 s lt 10 8 gt selector 3 s lt 14 12 gt Returns The returned value r is computed to be result n input selector n where result n is the nth byte of r Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 19 __nv_cbrt Prototype double nv cbrt double x Description www nvidia com Libdevice User s Guide Part 000 _v5 5 13 Function Reference Calculate the cube root of x x13 Returns Returns x13 gt _ nv_cbrt 0 returns 0 gt _ nv_cbrt returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 20 _nv_cbrtf Prototype NO aie Q my dorer loet ex Description Calculate the cube root of x x1 3 Returns Returns x13 gt _ nv_cbrtf 0 returns 0 gt _ nv_cbrtf co returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability C
13. Yes Compute 3 0 Yes Compute 3 5 Yes 3 248 __nv_pow Prototype double nv pow double x double y Description Calculate the value of x to the power of y Returns gt _nv_pow 0 y returns oo for y an integer less than 0 gt _nv_pow 0 y returns 0 for y an odd integer greater than 0 gt _nv_pow 0 y returns 0 for y gt 0 and not and odd integer gt _nv_pow l returns 1 gt _ nv_pow 1 y returns 1 for any y even a NaN www nvidia com Libdevice User s Guide Part 000 _v5 5 130 Function Reference gt _ nv_pow x 0 returns 1 for any x even a NaN gt _ nv_pow x y returns a NaN for finite x lt 0 and finite non integer y __nv_pow x 00 returns oo for ld lt 1 gt _ nv_pow x returns 0 for gt L __nv_pow x returns 0 for lx lt L __nv_pow x returns for lx gt L __nv_pow oo y returns 0 for y an odd integer less than 0 __nv_pow y returns 0 for y lt 0 and not an odd integer __nv_pow y returns oo for y an odd integer greater than 0 gt gt gt gt __nv_pow y returns for y gt 0 and not an odd integer gt __nv_pow y returns 0 for y lt 0 gt __nv_pow y returns for y gt 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute
14. gt __nv_erfcxf x returns if the correctly calculated value is outside the double floating point range For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 83 __nv_erff Prototype float nv erff float x Description X Calculate the value of the error function for the input argument x a e tdt TU 0 Returns gt _ nv erff 0 returns 0 gt _ nv_erff 00 returns 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 45 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 84 __nv_erfinv Prototype double nv erfinv double x Description Calculate the inverse error function of the input argument y for y in the interval 1 1 The inverse error function finds the value x that satisfies the equation y erf x for l lt y lt l and lt x lt oo Returns gt _ nv _erfinv l returns o gt _ nv erfinv 1 returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 85 __nv_erfinvf Prototype float nv erfinvf float x Description Calculate th
15. 162 3 310 O UL AAA Po A Ses domes 163 3 31 MV UU scared laa Un a de 163 3312 NV Ni ds 164 333135 NV USA sirsceind cass devse cies sae os data EEANN ted sg eausins os AEREE EEA 164 r eE NV VO OU yA lt t heat cameseemedelahteat enietemeceemeecenteds 165 3 315 NV yO sees estes vecens E AEEA NEEE havea deed giles coher esbawe caeives Sessa 165 BEMOL NV li sews ewes ccanws cg eebtuaeae aden s bee gewademestiewws Pee a 166 BM MV error rl ci tai 166 O A IN 167 A O 168 www nvidia com Libdevice User s Guide Part 000 _v5 5 ix LIST OF TABLES Table 1 Supported Reflection Parameters ocococccncocncnccnccncnccnnncnnnconccncnconnconnnanccccccncnes 2 Table 2 Library version selection guidelines oocococoncconcccnncnnncnnncnncnaccnccncnnccnncanccnnnons 3 www nvidia com Libdevice User s Guide Part 000 _v5 5 x Chapter 1 INTRODUCTION 1 1 What Is libdevice The libdevice library is a collection of NVVM bitcode functions that implement common functions for NVIDIA GPU devices including math primitives and bit manipulation functions These functions are optimized for particular GPU architectures and are intended to be linked with an NVVM IR module during compilation to PTX This guide documents both the functions available in libdevice and the basic usage of the library from a compiler writer s perspective www nvidia com Libdevice User s Guide Part 000 _v5 5 1 Chapter 2 BASIC USAGE 2 1 Linking with
16. 3 0 Yes Compute 3 5 Yes 3 250 __nv_powi Prototype double nv powi double x 132 y Description Calculate the value of x to the power of y Returns gt _ nv _powi 0 y returns for y an integer less than 0 0 y returns 0 for y an odd integer greater than 0 0 y returns 0 for y gt 0 and not and odd integer returns 1 y returns 1 for any y even a NaN gt _ nv_powi __nv_powi __nv_powi v v yv __nv_powi __nv_powi x 0 returns 1 for any x even a NaN __nv_powi x y returns a NaN for finite x lt 0 and finite non integer y v v v __nv_powi x oo returns oo for Ix lt 1 co returns 0 for x lt 1 gt _ nv _powi x 00 returns co for gt L gt _ nv _powi y returns 0 for y an odd integer less than 0 __nv_powi oo y returns 0 for y lt 0 and not an odd integer __nv_powi oo y returns oo for y an odd integer greater than 0 __nv_powi oo y returns for y gt 0 and not an odd integer __nv_powi y returns 0 for y lt 0 i i i i 1 i 1 i i i gt __nv_powi x 00 returns 0 for lx gt 1 __nv_powi x i x i i i i i www nvidia com Libdevice User s Guide Part 000 _v5 5 132 Function Reference gt _nv_powi y returns for y gt 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Co
17. 3 5 Yes 3 249 __nv_powf Prototype float nv powf float x float Z y Description Calculate the value of x to the power of y Returns gt nv_powf 0 y returns oo for y an integer less than 0 gt _ nv_powf 0 y returns 0 for y an odd integer greater than 0 gt nv_powf 0 y returns 0 for y gt 0 and not and odd integer gt nv_powf 1 returns 1 gt _ nv _powf 1 y returns 1 for any y even a NaN gt _ nv _powf x 0 returns 1 for any x even a NaN gt _ nv_powf x y returns a NaN for finite x lt 0 and finite non integer y gt _ nv_powf x 00 returns for lxi lt 1 gt __nv_powf x 00 returns 0 for ld gt 1 gt _ nv_powf x returns 0 for ld lt 1 www nvidia com Libdevice User s Guide Part 000 _v5 5 131 Function Reference gt _ nv _powf x returns oo for ld gt L gt _ nv _powf y returns 0 for y an odd integer less than 0 gt _ nv _powf y returns 0 for y lt 0 and not an odd integer gt _ nv _powf oo y returns co for y an odd integer greater than 0 gt _ nv _powf oo y returns for y gt 0 and not an odd integer gt _ nv _powf y returns 0 for y lt 0 gt _nv_powf y returns for y gt 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute
18. 5 Yes 3 278 __nv_sinhf Prototype float nv sinhf float x Description Calculate the hyperbolic sine of the input argument x Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 147 Function Reference gt _ nv_sinhf 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 279 __nv_sinpi Prototype double __nv sinpi double x Description Calculate the sine of x X TT measured in radians where x is the input argument Returns gt _ nv_sinpi 0 returns 0 gt _ nv_sinpi co returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 280 __nv_sinpif Prototype float nv sinpif float x Description Calculate the sine of x X TT measured in radians where x is the input argument Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 148 Function Reference gt _ nv_sinpif 0 returns 0 gt __nv_sinpif co returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 281 __nv_sqrt Prototype double nv sqrt double x Desc
19. Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 266 nv_saturatef Prototype float nv saturatef float x Description Clamp the input argument x to be within the interval 0 0 1 0 Returns __nv_saturatef x returns 0 if x lt 0 __nv_saturatef x returns 1 if x gt 1 x returns x ifO lt x lt 1 __nv_saturatef NaN returns 0 __nv_saturatef v v v y www nvidia com Libdevice User s Guide Part 000 _v5 5 141 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 267 __nv_scalbn Prototype double nv scalbn double x 132 y Description Scale x by 2 by efficient manipulation of the floating point exponent Returns Returns x 2 gt _ nv_scalbn 0 n returns 0 gt _ nv_scalbn x 0 returns x gt _ nv_scalbn n returns Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 268 __nv_scalbnf Prototype PMA ny scalona loa 152 Description Scale x by 2 by efficient manipulation of the floating point exponent Returns Returns x 2 gt _ nv_scalbnf 0 n returns 0 gt _ nv_scalbnf x 0 returns x gt _ nv_scalbnf n returns www nvidia com Libdevice User s Guide Function Reference Part 000 _v5 5 142 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 269 _ nv_signbitd
20. Convert the double precision floating point value x to a signed 64 bit integer value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 31 Function Reference Compute 3 5 Yes 3 56 nv_double2ll_ru Prototype 164 nv double211 ru double s Description Convert the double precision floating point value x to a signed 64 bit integer value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 57 nv_double2ll_rz Prototype 164 nv double211 rz double E Description Convert the double precision floating point value x to a signed 64 bit integer value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 32 Function Reference 3 58 nv_double2Zloint Prototype 132 nv double2loint double d Description Reinterpret the low 32 bits in the double precision floating point value x as a signed integer Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 59 nv_double2uint_rd Prototype 132 nv double2uint_rd double d Description Convert the d
21. Function Reference Compute 3 5 Yes 3 227 __nv_logf Prototype float nv logf float x Description Calculate the base e logarithm of the input argument x Returns gt _ nv logf 0 returns oo gt _ nv _logf 1 returns 0 gt _ nv _logf x returns NaN for x lt 0 gt __nv_logf returns 00 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 228 __nv_longlong_as_double Prototype double nv _longlong as double i64 x Description Reinterpret the bits in the 64 bit signed integer value x as a double precision floating point value Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 120 Function Reference Compute 3 5 Yes 3 229 nv_max Prototype 132 nv max i32 x 132 y Description Determine the maximum value of the two 32 bit signed integers x and y Returns Returns the maximum value of the two 32 bit signed integers x and y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 230 _ nv_min Prototype 1S2 Q my iim LS ezg T32 y Description Determine the minimum value of the two 32 bit signed integers x and y Returns Returns the minimum value of the two 32 bit signed integers x and
22. MATERIALS AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE Information furnished is believed to be accurate and reliable However NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use No license is granted by implication of otherwise under any patent rights of NVIDIA Corporation Specifications mentioned in this publication are subject to change without notice This publication supersedes and replaces all other information previously supplied NVIDIA Corporation products are not authorized as critical components in life support devices or systems without express written approval of NVIDIA Corporation Trademarks NVIDIA and the NVIDIA logo are trademarks or registered trademarks of NVIDIA Corporation in the U S and other countries Other company and product names may be trademarks of the respective companies with which they are associated Copyright 2013 NVIDIA Corporation All rights reserved Sy www nvidia com NVIDIA
23. Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 91 Function Reference 3 171 nv_fsub_rd Prototype float nv fsub rd float x float y Description Compute the difference of x and y in round down to negative infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 172 nv _fsub_rn Prototype float nv teto rn float x float y Description Compute the difference of x and y in round to nearest even rounding mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 92 Function Reference Compute 3 5 Yes 3 173 nv _fsub ru Prototype log C my tero cliloar es Cloer Sy Description Compute the difference of x and y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operat
24. Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 85 Function Reference Compute 3 5 Yes 3 160 __nv_frcp_rd Prototype float nv frcp rd float x Description Compute the reciprocal of x in round down to negative infinity mode Returns Returns J For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 161 _ nv_frcp_rn Prototype float nv irop rn float x Description Compute the reciprocal of x in round to nearest even mode Returns Returns J For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 86 Function Reference Compute 3 5 Yes 3 162 __nv_frcp_ru Prototype float nv frcp ru float x Description Compute the reciprocal of x in round up to positive infinity mode Returns Returns J For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 163 __ nv_frcp_rz Prototype float nv irop rz float x Description
25. Yes Compute 3 0 Yes Compute 3 5 Yes 3 143 __nv_fma_ru Prototype double nv fma ru double x double Sy double z www nvidia com Libdevice User s Guide Part 000 _v5 5 75 Function Reference Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round up to positive infinity mode Returns Returns the rounded value of x x y Z as a single operation gt _ nv_fma_ru 0 z returns NaN gt _ nv_fma_ru 0 z returns NaN gt _ nv_fma ru x y returns NaN if XX y is an exact gt _ nv_fma ru x y 00 returns NaN if XX y is an exact 00 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 144 __nv_fma_rz Prototype double nv fma rz double x double Sy double z Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round towards zero mode Returns Returns the rounded value of x X y Z as a single operation gt _ nv_fma_rz 0 z returns NaN gt _ nv_fma_rz 0 z returns NaN gt _ nv_fma rz x y returns NaN if x x y is an exact gt _ nv_fma rz x y 00 returns NaN if XX y is an exact For accuracy information for this function see the CUDA C Programming Guide Appendix
26. _v5 5 139 Function Reference 3 263 __nv_rsqrt Prototype double nv rsgrt double x Description Calculate the reciprocal of the nonnegative square root of x 1 I Vx E Returns Returns 1 I Vx gt __nv_rsqrt returns 0 gt _ nv rsqrt 0 returns gt _ nv_rsqrt x returns NaN if x is less than 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 264 _ nv_rsartf Prototype Eloat Q nv esqret float ox Description Calculate the reciprocal of the nonnegative square root of x 1 Vx Returns Returns 1 I Vx gt _ nv _rsqrtf returns 0 gt _ nv rsqrtf 0 returns gt __nv_rsqrtf x returns NaN if x is less than 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 140 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 265 nv_sad Prototype 12 VES INES 2 TA Sy 192 S2 Description Calculate x y z the 32 bit sum of the third argument z plus and the absolute value of the difference between the first argument x and second argument y Inputs x and y are signed 32 bit integers input z is a 32 bit unsigned integer Returns Returns x y Z Library
27. b Description Decompose the floating point value x into a component m for the normalized fraction element and another term n for the exponent The absolute value of m will be greater www nvidia com Libdevice User s Guide Part 000 _v5 5 88 Function Reference than or equal to 0 5 and less than 1 0 or it will be equal to 0 x m 2 The integer exponent n will be stored in the location to which nptr points Returns Returns the fractional component m gt _ nv frexpf 0 nptr returns 0 for the fractional component and zero for the integer component gt _ nv frexpf 0 nptr returns 0 and stores zero in the location pointed to by nptr gt _ nv frexpf nptr returns and stores an unspecified value in the location to which nptr points gt __nv_frexpf NaN y returns a NaN and stores an unspecified value in the location to which nptr points For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 166 __ nv_frsqrt_rn Prototype lose my roere eai locie es Description Compute the reciprocal square root of x in round to nearest even mode Returns Returns 1 Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libd
28. merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 44 __nv_dmul_rz Prototype double nv dmul rz double x double S y Description Multiplies two floating point values x and y in round towards zero mode Returns Returns x y www nvidia com Libdevice User s Guide Part 000 _v5 5 26 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 45 nv_double2float_rd Prototype float nv double2float_rd double d Description Convert the double precision floating point value x to a single precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 46 nv_double2float_rn Prototype float nv double2float_rn double d Description Convert the double precision floating point value x to a single precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 27 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 47 nv_double2float_ru Proto
29. nv_loglp 1 returns 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 116 Function Reference gt _ nv_loglp x returns NaN for x lt 1 gt _ nv_loglp returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 222 __nv_log1pf Prototype float nv loglpf float x Description Calculate the value of log i x of the input argument x Returns gt _ nv _loglpf 0 returns oo gt _ nv_loglpf 1 returns 0 gt _ nv_loglpf x returns NaN for x lt 1 gt _ nv_loglpf returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 223 __ nv_log2 Prototype double nv log2 double x Description www nvidia com Libdevice User s Guide Part 000 _v5 5 117 Function Reference Calculate the base 2 logarithm of the input argument x Returns gt _ nv log2 0 returns oo gt _ nv _log2 1 returns 0 gt _ nv _log2 x returns NaN for x lt 0 gt __nv_log2 returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 224 __
30. nv_normcdf Prototype double nv normcdf double x Description Calculate the cumulative distribution function of the standard normal distribution for input argument y H y Returns gt _ nv_normcdf oo returns 1 gt _ nv_normcdf oo returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 127 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 243 nv_normcdff Prototype float Q_ nv normcdff float x Description Calculate the cumulative distribution function of the standard normal distribution for input argument y H y Returns gt _ nv_normcadff returns 1 gt __nv_normcdff returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 244 __nv_normcdfinv Prototype double nv normcdfinv double x Description Calculate the inverse of the standard normal cumulative distribution function for input argument y 9 y The function is defined for input values in the interval 0 1 Returns gt _ nv_normcdfinv 0 returns oo gt _ nv_normcafinv 1 returns www nvidia com Libdevice User s Guide Part 000 _v5 5 128 Function Reference gt _ nv_normcdfinv x r
31. returns x if x is finite www nvidia com Libdevice User s Guide Part 000 _v5 5 82 Function Reference gt _ nv_fmod x 0 returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 155 nv_fmodf Prototype float nv fmodf float x float y Description Calculate the floating point remainder of x y The absolute value of the computed value is always less than y s absolute value and will have the same sign as x Returns gt Returns the floating point remainder of x y gt _ nv_fmodf 0 y returns 0 if y is not zero gt _ nv _fmodf x y returns NaN and raised an invalid floating point exception if x is or y is zero gt _ nv_fmodf x y returns zero if y is zero or the result would overflow gt _ nv_fmodf x returns x if x is finite gt _ nv_fmodf x 0 returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 156 __nv_fmul_rd Prototype float nv fmul rd float x float y www nvidia com Libdevice User s Guide Part 000 _v5 5 83 Function Reference Description Compute the product of x and y in round down to negative infinity mode Returns Returns x y For accuracy informati
32. sngsindecedcsvuginiesedesnsededesaesas 94 3 177 _ nv_hiloint2double oooococccccoccnnnncncnononononaconononncnco cnc nana nc conan o a eaa 95 321782 A denmasiumncemsadin E AAE IE summczie ENEE E T TT 95 3179 MV PY POU ranen ena e AEE E E AN EEE E 96 3 180 MV ilog id ais 96 34181 A e ii eS 97 3 182 NVAINCZAOUBIS revisaci n iris dede 97 3 183 AV int2float dun il ios 98 3 184 TW int2float IM sc sccsecsteeses os sonar AE 98 3 185 y 11 08 11092 loat isena a a TO 99 3 186 nv int2float Zea cites nvidia tagelevn a dae mm dawn gee ne peed Ea oO beg Shale CONG we settee cde aw ones 99 3 187 NV Ms TO diri AAA AR ts 100 3 188 MVoISfINItOd uscar lar il sad 100 3 189 A ES AENA 100 3 190 MVA Oi onoaedacacetendewans debuececeiheswatece devas 101 3 191 NE ERA 101 3 192 A AN 102 3193 MV Ti id 102 32194 MV TO cis a A A A cae 103 3193 A 103 3 196 MVT is A A EN 104 3 197 W Miri a A A A a A aces 104 O ev scnccacdeed seek A E E ee buand E E E E 105 3 199 NV Idex Dieser inniinn Enae EEEE EEEE E EN EE E E 106 8 200 O an eas seran EEEE RENERE AENA EERE E REE aaea 106 3 201 2 E P E A E E ae EE E ee 107 3 202 Mu gamma ersin rn dence ii did 107 3 203 nV lZ double Tdescrcosinnos irene ines 108 3 204 nv lZdouble T Menaren a a R E EE e a Ea E E 108 3 205 nv llZdouble TUivesacinsniic cag cen nri ri ir ir E EE aaa 109 3 206 NV UZdOUDIE TZ veria a AA AAA RA 109 www nvidia com Libdevice User s Guide Par
33. x Returns Returns 10 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 89 __nv_exp2 Prototype double nv exp2 double zx Description Calculate the base 2 exponential of the input argument x Returns Returns 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 48 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 90 __nv_exp2f Prototype float nv exp2f float x Description Calculate the base 2 exponential of the input argument x Returns Returns 2 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 91 __ nv_expf Prototype float nv_expf float x Description Calculate the base e exponential of the input argument x Returns Returns e www nvidia com Libdevice User s Guide Part 000 _v5 5 49 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 92 __nv_expm1 Prototype double nv expml
34. x is a infinite value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 190 __nv_isinff Prototype 192 Q ny A a AS Description Determine whether the floating point value x is an infinite value positive or negative Returns Returns a nonzero value if and only if x is a infinite value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 191 nv_isnand Prototype 132 nv isnand double x Description Determine whether the floating point value x is a NaN Returns Returns a nonzero value if and only if x is a NaN value www nvidia com Libdevice User s Guide Part 000 _v5 5 101 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 192 nv_isnanf Prototype 132 Q ay temem float 3x Description Determine whether the floating point value x is a NaN Returns Returns a nonzero value if and only if x is a NaN value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 193 __ nv_jO Prototype double nv_j0 double x Description Calculate the value of the Bessel function of the first kind of order 0 for the input argument x J dx Returns Returns the value of the Bessel function of the first kind of order 0 gt __nv_j0 returns 0 gt __nv_j0 NaN returns NaN For accuracy information for this function see the CUDA C Programming Gui
35. y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 231 nv_modf Prototype double nv modf double x double b www nvidia com Libdevice User s Guide Part 000 _v5 5 121 Function Reference Description Break down the argument x into fractional and integral parts The integral part is stored in the argument iptr Fractional and integral parts are given the same sign as the argument x Returns gt _ nv_modf X iptr returns a result with the same sign as x gt _ nv_modf iptr returns 0 and stores in the object pointed to by iptr gt _ nv_modf NanN iptr stores a NaN in the object pointed to by iptr and returns a NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 232 _nv_modff Prototype loce C my molar Gelloyene wsp Cloer Go Description Break down the argument x into fractional and integral parts The integral part is stored in the argument iptr Fractional and integral parts are given the same sign as the argument x Returns gt _nv_modff X iptr returns a result with the same sign as x gt _ nv_modff iptr returns 0 and stores in the object pointed to by iptr gt _ nv_modff NaN iptr stores a NaN in the object pointed to by iptr and returns a NaN For accuracy information for t
36. 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 139 __nv_floorf Prototype float nv floorf float wE Description Calculates the largest integer value which is less than or equal to x Returns Returns log 1 x expressed as a floating point number gt _ nv floorf returns oo gt _ nv floorf 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 73 Function Reference 3 140 _ nv_fma Prototype double nv fma double x double Sy double z Description Compute the value of x x y Z as a single ternary operation After computing the value to infinite precision the value is rounded once Returns Returns the rounded value of x x y Z as a single operation gt _ nv_fma o 0 z returns NaN gt _ nv_fma 0 z returns NaN gt _ nv_fma x y 00 returns NaN if XX y is an exact gt _ nv_fma x y returns NaN if XX y is an exact oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Ye
37. 000 _v5 5 60 Function Reference 3 112 __nv_fdimf Prototype float nv fdimf float x float y Description Compute the positive difference between x and y The positive difference is x y when x gt y and 0 otherwise Returns Returns the positive difference between x and y gt _ nv _fdimf x y returns x y if x gt y gt _ nv_fdimf x y returns 0 if x lt y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 113 nv _fdiv_rd Prototype loewe Q my mobi eilear es loct es Description Divide two floating point values x by y in round down to negative infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 61 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 114 nv _fdiv_rn Prototype float nv fdiv rn float x float y Description Divide two floating point values x by y in round to nearest even mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 115 _ nv_fdiv_ru Prototype Eloat cnt di
38. 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 252 nv_rcbrt Prototype double nv rcbrt double x Description Calculate reciprocal cube root function of x Returns gt _ nv _rcbrt 0 returns gt _ nv _rcbrt 00 returns 0 gt For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 253 nv_rcbrtf Prototype llene O my reortr locie wz Description Calculate reciprocal cube root function of x Returns gt _ nv _rcbrtf 0 returns gt _ nv rcbrtf returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 134 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 254 nv_remainder Prototype double nv remainder double x double Z y Description Compute double precision floating point remainder r of dividing x by y for nonzero y Thus r x ny The value n is the integer value nearest In the case when In 1 the even n value is chosen Returns gt _ nv_remainder x 0 returns NaN gt _ nv_remainder y returns NaN gt _ nv_remainder x returns x for finite x For accuracy information for this function see the CUDA C Programming Guide Appendix C T
39. 46 3 277 AV SiM Neessen A A Ae 147 3 278 NV SINE ii o 147 3 279 MOV MP iii A EEE EEEE EEEE da 148 3 280 MVP iii a A A a A AAA 148 LA A O NA 149 322826 MVE rin NA T A 149 ON 150 3 284 A AA 151 3 285 NV TAN diia 151 3 286 _ NV TANT ii ri Aa 152 3 287 INV tamma seis caw EN 152 3 288 NV t8aM MA secs ccece ester ieee se aden a iii 153 3 289 MV TUNG iS aio 153 3 290 NV ArU C essnee aae a 154 3 291 NV UMA vo5sc5cae scans eeedeta ceive e e ani EN 154 3 292 nV uint2d uble Oicicnninnscc cir 155 www nvidia com Libdevice User s Guide Part 000 _v5 5 viii 3 293 AA Loa o ONO Do PPm bes sla ne Sa N 8 s da eis otartee nis eMedia wibes enable EDS 155 3 294 NV WINtZHlOAt Mirian sede deesienToues eves eeealanes 156 3 295 cNVIMINEZELOAt Mes seco vssdeveeesndanseuworecvnndoesdaaeoensscdsmsenvessess menemeeeeds nseas do 156 3 296 nV WINCZEO at IZ seisan naa ROS na iaa aa 156 35297 6 NV UlMLZGOUDIE Tdi teense cette AAA eevee dbnnse vetegeueeee sds 157 3 298 NV UNIZAOUDIS Tiisd cscs cesses sce se rii cceeas ds 157 3 299 NV UUMZAOUBIS Tios cos snaosain raK seen ar aaa aan 158 3 300 NVUNIZAOUBIE TZ avatar 158 3 301 nV Ullfloat di Ra 159 3 302 UA AAA o tia eden swdbiena ation sameans an E EEOAE ANE 159 3 303 AV UU ZFlO ats csexesseerwessawnnweds dd 160 3 304 MV Ull2 a lin A A AAA 160 3 305 NV Ulma ada 160 33062 MV UL dai chiva cid 161 35307 NV UMa A ares 161 3308 MV UM MD nas 162 3 309 NV UU A ia a
40. 55 Function Reference 3 294 __nv_uint2float_rn Prototype float nv uint2float _ rn i32 in Description Convert the unsigned integer value x to a single precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 295 nv_uint2float_ru Prototype slo ay uimcarloet in LS Sim Description Convert the unsigned integer value x to a single precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 296 __nv_uint2float_rz Prototype log C my vam til ocme aio Ln www nvidia com Libdevice User s Guide Part 000 _v5 5 156 Function Reference Description Convert the unsigned integer value x to a single precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 297 nv_ull2double_rd Prototype double nv ull2double rd i64 1 Description Convert the unsigned 64 bit integer value x to a double precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 298 nv_ull2double_rn Prototype double
41. 64 inclusive representing the number of zero bits Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 16 Function Reference 3 25 __nv_copysign Prototype double nv copysign double x double S y Description Create a floating point value with the magnitude x and the sign of y Returns Returns a value with the magnitude of x and the sign of y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 26 __nv_copysignf Prototype float nv copysignf float x float y Description Create a floating point value with the magnitude x and the sign of y Returns Returns a value with the magnitude of x and the sign of y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 27 nv_cos Prototype double nv cos double x www nvidia com Libdevice User s Guide Part 000 _v5 5 17 Function Reference Description Calculate the cosine of the input argument x measured in radians Returns gt _ nv_cos 0 returns 1 gt _ nv_cos returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 28 __nv_cosf Prototype float nv cosf float x Description Calculate the cosine of the input argument x measured in radians
42. A NVIDIA LIBDEVICE USER S GUIDE TABLE OF CONTENTS Chapter 1 IMtroductiOMiscsscwaccccdesac iniciada cada 1 1 1 What Is lbDdevice irc ii ai 1 Chapter 2 Basie Usage ica dic 2 2 1 Linking With libDdSVicS ici idas 2 2 2 Selecting Library Ver cocida a a iaa 3 Chapter 3 z Function Reference isaac 4 A A RS O 4 3 2 A 4 Be Sek MV ACOS eaaa e ORO 5 BD As 5 A 5 3 55 NVEACOSNT ys vsscntsnssaevisd A desbndeetdddeesaiuadaddonseneedeend 6 36s MV aSo ernn in aE E E dia werdlaaw co NEEN ere cibuins seed dae oud cee ewan ee haab anaes 7 3 7 TW ASI o3 pace oes TO O 7 B 8e NV ASIN AAA DZ2 I D NO 8 IS Oi AAA A AAA A 8 3 10 A RA 9 A NN 9 312 My atan Z AAA Oye RR 10 3 13 ny dr ii aida 10 A NARRO 11 310 MV ALAN eroticas 11 3 16 NV Dr EV sis wmscnsicd parien si sAN EAER E AOTAN AEAEE RANEE KARAAT canes 12 3 17 RRA E T Eaa 12 3 18 nv byte PerMiccinniiinina a aE sE n EEEE ENE NERE EEn A A A 13 T k R a NA E AN 13 20 NOVO E EE E E E E E ATE 14 PNA PREE AE E li A E svead as seeeateNes 15 3 22 a A A 15 A MVE CIZ re R A 16 3 24 NV Cll ai A A dia aia 16 3 29s MVACOP Y Mide ati EA a 17 3 26 NV COPYSISNT ii A A EEES 17 A SS E OS 17 B28 MV COST aieeao E EE EEE ais 18 3 29 NV COSH POCO RI RIRS 18 A AU E T E E EEE 19 E E POENE a h A oto i o PEE 5 EA 19 3 32 PP EEEE TE O E tiveness 20 3 337 MV dadd nissan ee o EAE EANA 21 3 34 MV dadd Mini it a a e ride 21 www nvidia com Libdevice User s Gui
43. AA a 34 3 62 ny d uble2uint TZ iii A ovations VEE es da 34 3 63 NV doubleZUll de coin in a 35 3 64 NV double2 WLM ono A 35 3 65 MV _doUbleZull Usina A A A ceeatadeers cons 36 3 66 MV doUbleZull inci a 36 3 67 NV double AS lONSlONG i lt asidiceesia sive sieeve dea A a 37 3 68 nv drep I sasiivian ansia A A Meese pees NEN oe RETE 37 3 09 A consieaueaiereossmooenenmucendeoesesdesesencaines 38 3 70 __ NV GPCD2 q E E T I O E E N O T N NE 38 E E ia D O RN 39 E A NN 39 ES A Saaotaies otieeds EEVEE EEEE EE 40 eA MVA SAR ae E E 40 3 10 A q iaa aa A 41 376 ON iii as in ii a a E EE EEE 41 A A ER 42 www nvidia com Libdevice User s Guide Part 000 _v5 5 iii 3 78 3 79 3 80 3 81 3 82 3 83 3 84 3 85 3 86 _ 3 87 3 88 3 89 __ 3 90 3 91 __ 3 92 3 93 3 94 DIV iii ds iii 42 DIVA CI ist A a 43 A de Ly ha POPE Eu OR R A 43 IV di A ye canaries A E AE E EE 44 DIVA AAA AA AAA AAA 45 Dio AAA E a 45 aA Ah A NA 46 IVC iras ii 46 A AO 50 NR a E PE O vee A E deddeteoontebndse dabedievadesmenndees 50 DIV o es Deve ena a ida do 51 A 8 O 51 3 96 MV fadd Td sacra id des 52 3 97 c A RS RE 52 3 98 A E 53 3 994 MV fadd Presario a a aia ads 53 3 100 Dv fast COSK i lt esssise cessnendecs cdi vida vag diovan aci 54 3101 NV fast EXP Obra ca A A A A AA an 54 3102 AS AAA II E EEEE E EA A 55 3 103 nv fast AAA saanceae eds aundsadweseseess 56 3 104 NV fast lOs irnos dir
44. AAINVE 3 oasis evinces cria nies ridad danita dees 129 3246 MY A ss eansaasainssteuse ns asl eebeneneenesdeeaseasess 129 3 247 _ A NN 130 3 248 i MV POW wien nyireni neea se reciente cahle cs obs cab EE tdeveenbewetdlias nissaehiyealtee sane 130 3249 NV DOW ec ccsearce rnn erreen an A A is 131 www nvidia com Libdevice User s Guide Part 000 _v5 5 vii 3 250 MV POW iiss aide ia id 132 3 291 MV POWI sesine or Rannin riinan AERO AREENAN RERS 133 3 252 NV q el O E O AN 134 3 253 O O iii Saeta 134 3 2543 MVE Moros A AAA AAA 135 3 255 A RO 135 3 206 NW PEMU Onasis ir i siaaa E NACAR ANTERA ROA ARARA ARARA ARASEN AAAA ARARNAR 136 3207 IN EMO ri da 137 3 258 NV MA iii daa des 137 3259 MVE A asian 138 3 2602 NV O ii Ara 138 32601 A RAE 139 3 262 AV OU O ci id a 139 LO IV ri sinreedu E namics hatieele tailed sieice db kieele a hikie 140 3 264 _ INVEST asi aicsccasadionsesacuanacinteatecd EREET ESERE KECER AAEE RAEO OREK 140 3 2695 MV A 141 3 2606 NV SU anie a E E EE E E E OEE 141 3 267 NV scal Dh cil odes II A EEEO RE AERAR 142 3 268 MV SCALDMME isso i eaa ae anaE aea dws 142 3 269 MV SISNDICG essre err ra EE EE EEE NE KOORE O EAE NEN OASE es 143 322 05 S E E o a T E NAE E IT anne E EE E E A E T AT 143 S271 O NVESIN E T E A ARNO 144 3 272 ES A RO 144 3 273 NV ES INCOS rin ninen EEE EEE TEE EEEE EEEE 145 3 274 MV SINOS Plis e a EAE e 145 ETIA Aa PE O AA E E E E E E EEE 146 ALTOS NV SiM erener an A AA REEE 1
45. C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 76 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 145 nv_fmaf Prototype float nv fmaf float x float sy float z Description Compute the value of x x y Z as a single ternary operation After computing the value to infinite precision the value is rounded once Returns Returns the rounded value of x x y Z as a single operation gt _ nv _fmaf oo 0 z returns NaN gt _ nv fmaf 0 o z returns NaN gt _ nv_fmaf x y 00 returns NaN if x x y is an exact gt _ nv_fmaf x y returns NaN if xx y is an exact oo gt For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 146 nv_fmaf_rd Prototype logs my mier melee ox loeit yy MELO sz Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round down to negative infinity mode Returns Returns the rounded value of x X y Z as a single operation www nvidia com Libdevice User s Guide Part 000 _v5 5 77 Function Reference __nv_fmaf_rd 0 z returns NaN __nv_fmaf_rd 0 z returns NaN __nv_fmaf_rd x y returns NaN if x x y is an exact _ nv_fmaf _rd x y returns NaN i
46. C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 136 Function Reference 3 257 __nv_remquof Prototype loca mv zememot Cellos te Cloc Ey 1o27 eo Description Compute a double precision floating point remainder in the same way as the remainder function Argument quo returns part of quotient upon division of x by y Value quo has the same sign as 5 and may not be the exact quotient but agrees with the exact quotient in the low order 3 bits Returns Returns the remainder gt _ nv_remquof x 0 quo returns NaN gt _ nv_remquof y quo returns NaN gt _ nv_remquof x quo returns x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 258 nv_rhadd Prototype 192 Q my mado ise ee 192 ay Description Compute average of signed input arguments x and y as x y 1 gt gt 1 avoiding overflow in the intermediate sum Returns Returns a signed integer value representing the signed rounded average value of the two inputs Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 137 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 259 __nv_rint Prototype double nv rint double x Description Round x to t
47. Guide Part 000 _v5 5 24 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 41 _ nv_dmul_rd Prototype double nv dmul rd double x double y Description Multiplies two floating point values x and y in round down to negative infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 42 __nv_dmul_rn Prototype double nv dmul _rn double x double y Description Multiplies two floating point values x and y in round to nearest even mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 25 Function Reference CT This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 43 __nv_dmuLl ru Prototype double nv dmul ru double x double y Description Multiplies two floating point values x and y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be
48. Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 131 _ nv _float2uint_ru Prototype aso Q my EloereZulme ral loat tala www nvidia com Libdevice User s Guide Part 000 _v5 5 69 Function Reference Description Convert the single precision floating point value x to an unsigned integer in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 132 __nv_float2uint_rz Prototype asa my aloe viie ir elos wim Description Convert the single precision floating point value x to an unsigned integer in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 133 nv _float2ull_rd Prototype EA C my selene Zw ze leeis r Description Convert the single precision floating point value x to an unsigned 64 bit integer in round down to negative infinity mode Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 70 Function Reference Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 134 nv _float2ull_rn Prototype ploy Q my loeti sa ac ilreyetie SE Description Convert the single precision floating point value x to an unsigned 64 bit integer in round to nearest even mode Returns Returns converted value Li
49. Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 99 nv_fadd_rz Prototype Eloak my face rz float Eloet oy Description www nvidia com Libdevice User s Guide Part 000 _v5 5 53 Function Reference Compute the sum of x and y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 100 __nv_fast_cosf Prototype asllog e Q my ies casi i loeis es Description Calculate the fast approximate cosine of the input argument x measured in radians Returns Returns the approximate cosine of x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Input and output in the denormal range is flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 101 __nv_fast_exp10f Prototype float nv fast expl0f float x www nvidia com Libdevice User s Guide Part 000 _v5 5 54 Function Reference Description Calculate the fast approximate base 10 exponential of the input argument x 10 Returns Returns an ap
50. Returns gt _ nv_cosf 0 returns 1 gt _ nv_cosf returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 29 __nv_cosh Prototype double nv cosh double x www nvidia com Libdevice User s Guide Part 000 _v5 5 18 Function Reference Description Calculate the hyperbolic cosine of the input argument x Returns gt _ nv_cosh 0 returns 1 gt _ nv_cosh o returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 30 __nv_coshf Prototype float nv_coshf float x Description Calculate the hyperbolic cosine of the input argument x Returns gt _ nv_coshf 0 returns 1 gt _ nv_coshf returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 31 __nv_cospi Prototype www nvidia com Libdevice User s Guide Part 000 _v5 5 19 Function Reference double nv cospi double x Description Calculate the cosine of x X TT measured in radians where x is the input argument Returns gt __nv_cospi 0 returns 1 gt __nv_cospi return
51. Yes Compute 3 0 Yes Compute 3 5 Yes 3 290 __nv_truncf Prototype float Q nv truncf float x Description Round x to the nearest integer value that does not exceed x in magnitude Returns Returns truncated integer value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 291 nv_uhadd Prototype io Gl my Una ais ey 12 y Description Compute average of unsigned input arguments x and y as x y gt gt 1 avoiding overflow in the intermediate sum Returns Returns an unsigned integer value representing the unsigned average value of the two inputs www nvidia com Libdevice User s Guide Part 000 _v5 5 154 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 292 nv_uint2double_rn Prototype double nv uint2double rn i32 1 Description Convert the unsigned integer value x to a double precision floating point value Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 293 nv_uint2float_rd Prototype float Q my juime2blloat rd 1S2 Sun Description Convert the unsigned integer value x to a single precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 1
52. Yes Compute 3 5 Yes 3 107 __nv_fast_powf Prototype float nv fast powf float x float sw Description Calculate the fast approximate of x the first input argument raised to the power of y the second input argument x Returns Returns an approximation to x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Most input and output values around denormal range are flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 108 nv _fast_sincosf Prototype void Q mv fase Sincost loci zp Eloei Sept leas CREE Description Calculate the fast approximate of sine and cosine of the first input argument x measured in radians The results for sine and cosine are written into the second argument sptr and respectively third argument zptr www nvidia com Libdevice User s Guide Part 000 _v5 5 58 Function Reference Returns gt none For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Denorm input output is flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 109 nv _fast_sinf Prototype loc Q my fast srar ieee w Description Calculate the fast approximate sine of the input argument x measured in radians Returns Returns the approximate sine of x For accuracy inform
53. able C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 255 nv_remainderf Prototype float nv _remainderf float exp float ey Description Compute double precision floating point remainder r of dividing x by y for nonzero y Thus r xX ny The value n is the integer value nearest In the case when In z 4 i the even n value is chosen www nvidia com Libdevice User s Guide Part 000 _v5 5 135 Function Reference Returns gt _ nv_remainderf x 0 returns NaN gt _ nv_remainderf 00 y returns NaN gt _ nv_remainderf x returns x for finite x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 256 __ nv_remquo Prototype double nv_remquo double x double Sy 132 c Description Compute a double precision floating point remainder in the same way as the remainder function Argument quo returns part of quotient upon division of x by y Value quo has the same sign as 5 and may not be the exact quotient but agrees with the exact quotient in the low order 3 bits Returns Returns the remainder gt _ nv_remquo x 0 quo returns NaN gt __nv_remquo y quo returns NaN gt __nv_remquo x quo returns x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table
54. ation for this function see the CUDA C Programming Guide Appendix C Table C 4 Input and output in the denormal range is flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 110 nv _fast_tanf Prototype float nv fast tanf float x Description www nvidia com Libdevice User s Guide Part 000 _v5 5 59 Function Reference Calculate the fast approximate tangent of the input argument x measured in radians Returns Returns the approximate tangent of x For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 The result is computed as the fast divide of __nv_sinf by __nv_cosf Denormal input and output are flushed to sign preserving 0 0 at each step of the computation Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 111 nv_fdim Prototype double nv fdim double x double y Description Compute the positive difference between x and y The positive difference is x y when x gt y and 0 otherwise Returns Returns the positive difference between x and y gt _ nv_fdim x y returns x y if x gt y gt _ nv fdim x y returns 0 if x lt y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part
55. brary Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 135 __nv_float2ull_ru Prototype 164 nv float2ull ru float f Description Convert the single precision floating point value x to an unsigned 64 bit integer in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 71 Function Reference Compute 3 5 Yes 3 136 nv _float2ull_rz Prototype ao day selene Zw ters Geen er Description Convert the single precision floating point value x to an unsigned 64 bit integer in round towards_zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 137 nv _float_as_int Prototype i32 nv float as int float x Description Reinterpret the bits in the single precision floating point value x as a signed integer Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 138 nv_floor Prototype double nv floor double f www nvidia com Libdevice User s Guide Part 000 _v5 5 72 Function Reference Description Calculates the largest integer value which is less than or equal to x Returns Returns log i x expressed as a floating point number gt _ nv floor returns gt _ nv floor
56. curacy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 105 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 199 __nv_ldexp Prototype o double nv ldexp double x 132 Z y Description Calculate the value of x 2 of the input arguments x and exp Returns gt __nv_Idexp x returns if the correctly calculated value is outside the double floating point range For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 200 __nv_ldexpf Prototype float nv ldexpf float x 132 y Description Calculate the value of x 2 of the input arguments x and exp Returns gt _ nv Idexpf x returns if the correctly calculated value is outside the double floating point range For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 106 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 201 __nv_lgamma Prototype double nv lgamma double x Description Calculate the natural logarithm of the absolute value of the gamma function of the input argument x namely the valu
57. de Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 102 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 194 __nv_jOf Prototype float nv jJOf float x Description Calculate the value of the Bessel function of the first kind of order 0 for the input argument x J dx Returns Returns the value of the Bessel function of the first kind of order 0 gt _ nv j0f returns 0 gt _ nv jOf NaN returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 195 _nv_j1 Prototype double nv 3j1 double x Description Calculate the value of the Bessel function of the first kind of order 1 for the input argument x J x Returns Returns the value of the Bessel function of the first kind of order 1 www nvidia com Libdevice User s Guide Part 000 _v5 5 103 Function Reference gt _nvjl 0 retums 0 gt __nv_jl returns 0 gt __nv_jl NaN returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 196 __ nv_jif Prototype aloe my TE Gelocie Les Description Calculate the value of the Bessel function of the first kind
58. de Part 000 _v5 5 ii 339 NV dadd A ciate shssoiovalgtaivrs r a a etlve sie e edie ciasdinnere ais eto niclotanove s oie a sie Baas 22 3 36 MV GAdd ri AAA A AA 22 337e 0 ARRE 23 3 38 O A RA 23 3 39 OMV ddiy Ticas dns A A Ala 24 3 40 nv ddiy ii a ii id 24 3141 MV GMUL decos iia ias RARA A ee 25 3 42 A A A ENNE 25 3 434 A ccavenseduaieeeesachiian E eseeecuieesmeeeactiuuan sana cebbes sucecas sie tee 26 3 44 MV MU FL iia sa a o ido 26 349 Tv GOUDIEZ TO adrian rc mes Sacnleeerenseeecssernrsuntesseaseaedesweeens 27 3 46 NV double2float Miri ii di a dis 27 3 47 nv_double2float_rU oooooccccccccconnnncccnoncnncncocononnn cnn eeeeeaeeseeeeeeeseseeeesesaeeeees 28 3 48 __nv_double2float_IZ ooocoooccccconccnnncncnononanacacn con a a iin rana E on ana E ES 28 Pb Pa 0 A 6 001 C7200 0 rca nano crono ono nora roo ns REENER 29 3 90 MV GOUDIEZ INE Funcion Seuieernnee4 deed Usinceeembewes poeguwinedeess 29 35515 MV GOUDIEZINE Mii A ida 29 3 52 NV doubleZint Ussesi niei ean criadas droits 30 3 03 NV lt GOUBDlEZINGLIZ estos iia ca o iaa 30 3 54 nv doUbleZll dui a sas 31 3 09 MV doUble2 ll Osio o Si 31 3 56 Mv doblez TU sc dy sudcevsacade sa dessweeevon nadia 32 3 57 AI A RR S 32 3 98 MV d0UblellO ticos ri AAA AA A 33 3 99 NV GOUDLEZUINE Td ina l na saeewseas wieadwescespheees cages geneaes 33 3 60 NV _GOUDLEZUINE IN cs ssscss cscs susesace sess cdanssuue s RANEE ERAAN A Ra 33 3 61 TV GOUDlEZUINE liviana A
59. device library will have a new revision number www nvidia com Libdevice User s Guide Part 000 _v5 5 3 Chapter 3 FUNCTION REFERENCE This chapter describes all functions available in libdevice 3 1 __nv_abs Prototype 132 as 132 ox Description Determine the absolute value of the 32 bit signed integer x Returns Returns the absolute value of the 32 bit signed integer x Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 2 nv_acos Prototype double nv _acos double x Description Calculate the principal value of the arc cosine of the input argument x Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 4 Function Reference Result will be in radians in the interval 0 Tr for x inside 1 1 gt _ nv_acos 1 returns 0 gt _ nv_acos x returns NaN for x outside 1 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 3 __nv_acosf Prototype Elodie my cogir loet wx Description Calculate the principal value of the arc cosine of the input argument x Returns Result will be in radians in the interval 0 7r for x inside 1 1 gt _ nv_acosf 1 returns 0 gt _ nv_acosf x returns NaN for x outside 1 1 For accuracy information for this function see the CUDA C Programming Guid
60. double x Description Calculate the base e exponential of the input argument x minus 1 Returns Returns e 1 gt For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 93 __ nv_expm1f Prototype float nv expmlf float x Description Calculate the base e exponential of the input argument x minus 1 Returns Returns e 1 www nvidia com Libdevice User s Guide Part 000 _v5 5 50 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 94 __nv_fabs Prototype double nv fabs double f Description Calculate the absolute value of the input argument x Returns Returns the absolute value of the input argument gt _ nv fabs co returns gt _ nv fabs 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 95 __nv_fabsf Prototype ilove hy falsi ie oxen Ft Description Calculate the absolute value of the input argument x Returns Returns the absolute value of the input argument www nvidia com Libdevice User s Guide Part 000 _v5 5 51
61. double precision floating point value x to an unsigned 64 bit integer value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 64 nv_double2ull_rn Prototype 164 nv double2ull rn double E Description Convert the double precision floating point value x to an unsigned 64 bit integer value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 35 Function Reference Compute 3 5 Yes 3 65 nv_double2ull_ru Prototype 164 nv double2ull ru double f Description Convert the double precision floating point value x to an unsigned 64 bit integer value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 66 nv_double2ull_rz Prototype 164 nv double2ull rz double sE Description Convert the double precision floating point value x to an unsigned 64 bit integer value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 36 Function Reference 3 67 __nv_double_as_longlong Prototype 164 nv double as longlong doub
62. e Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 4 nv_acosh Prototype double nv acosh double x Description www nvidia com Libdevice User s Guide Part 000 _v5 5 5 Function Reference Calculate the nonnegative arc hyperbolic cosine of the input argument x Returns Result will be in the interval 0 gt _ nv_acosh 1 returns 0 gt __nv_acosh x returns NaN for x in the interval oo 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 5 __nv_acoshf Prototype Plain tacos illo aos Description Calculate the nonnegative arc hyperbolic cosine of the input argument x Returns Result will be in the interval 0 gt _ nv_acoshf 1 returns 0 gt __nv_acoshf x returns NaN for x in the interval oo 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 6 Function Reference 3 6 __nv_asin Prototype double nv asin double x Description Calculate the principal value of the arc sine of the input argument x Returns Result will be in radians in the interval Tr 2 Tr 2 for x inside
63. e inverse error function of the input argument y for y in the interval 1 1 The inverse error function finds the value x that satisfies the equation y erf x for l lt y lt l and lt x lt oo Returns gt _ nv_erfinvf 1 returns www nvidia com Libdevice User s Guide Part 000 _v5 5 46 Function Reference gt _ nv_erfinvf 1 returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 86 __nv_exp Prototype double nv exp double x Description Calculate the base e exponential of the input argument x Returns Returns e For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 87 __nv_exp10 Prototype double nv exp10 double x Description Calculate the base 10 exponential of the input argument x Returns Returns 10 www nvidia com Libdevice User s Guide Part 000 _v5 5 47 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 88 __nv_exp10f Prototype float Q_ nv expl0f float x Description Calculate the base 10 exponential of the input argument
64. e of log AS ett lg e Returns gt _ nv _lgamma 1 returns 0 gt _ nv _lgamma 2 returns 0 gt _ nv _lgamma x returns if the correctly calculated value is outside the double floating point range gt _ nv _lgamma x returns coif x lt 0 gt _ nv _lgamma returns oo gt _ nv _lgamma returns o For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 202 __ nv_lgammaf Prototype float nv_lgammaf float x Description Calculate the natural logarithm of the absolute value of the gamma function of the input argument x namely the value of lo all ett lg e www nvidia com Libdevice User s Guide Part 000 _v5 5 107 Function Reference Returns gt _ nv_lgammaf 1 returns 0 gt _ nv _lgammaf 2 returns 0 gt _ nv _lgammaf x returns if the correctly calculated value is outside the double floating point range gt _ nv lgammaf x returns cif x lt 0 gt _ nv _lgammaf returns oo gt _ nv lgammaf returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 203 nv _ll2double_rd Prototype double nv 112double rd 164 1 Description Convert t
65. e precision floating point value x to a signed integer in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 123 __nv_float2int_ru Prototype 192 Q my ElocueZabaie sam leei Sim Description Convert the single precision floating point value x to a signed integer in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 124 __nv_float2int_rz Prototype az y ElocreZibae sa loeis eim Description Convert the single precision floating point value x to a signed integer in round towards zero mode Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 66 Function Reference Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 125 nv _float2ll_rd Prototype ot Q ny ElocuZ ll relo kit Description Convert the single precision floating point value x to a signed 64 bit integer in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 126 nv float2ll_rn Prototype aa Q my Sloet 1 iaa cela esos Description Convert the single precision floating point value x to a signed 64 bit integer in round to nearest even mode Returns Returns con
66. e senesni re ri vais tare iaa wees viele a tints dice 75 3 144 NV fma I Zecccsuewuwseccntewaecd devine se wecienedinenneseced AA eceulenunene Sever ceetaen cee 76 3 145 MV Mota bl is 77 3 146 nv fmaf iii A ias 77 3 1474 MIAMI AAA 78 3 148 MU FM AL sai da E dais dan NEEESE EEE A 79 3 149 A AMAL Zac vedinsvcedsasis Savcodausas dead osaua studies sons AE EAEE ARNAR EANTA saeco nos 79 3 150 NV Mi A At 80 3 151 NV OR 80 3 152 NV TMIN enres O EES 81 A A A CT 82 3 154 NV MO ii A A ed iii 82 3 155 A A ARTO 83 3156 MV AMUL aa 83 3 157 IVA MU Oi AAA a 84 3 158 NV FMU TU Ada 85 3 159 AI rra nE E EEA anges E EEE EE SNEEN NDSS bed 85 3 160 MV freD NS 86 3 161 NVEAP CPIM oass2ssescaasusedendisensdseneacaie aa 86 3 162 NV Wisse sirenaren a e E tie O 87 3163 MV ICD Zear EEO E EE EE E a EAEG EANET ER 87 www nvidia com Libdevice User s Guide Part 000 _v5 5 v 3 164 A O nae dies cimeewaided ev ehew eddy EEEE NIDE E E canes eaelese NAE 88 3 1655 INV O santas euantedsrseateadeaged Gelenseenstenuuende 88 3 166 AAA E II sedensabaurnegees oveur sauna seeded 89 TA A A O AN 90 31007 MV ISE Oesoto A AREA de 90 3 169 A wuue ens ches E O E E EE E E E aN 91 E A A BA o ATEA E E AA E E E EEEE TE A E TIE EE 91 IAZ NV AS UD deisenda E EO AE E EE EA EEE EAE EE E DENEA 92 3 172 NV ASUD Tessins aniisi a Ad is chine wee 92 3 173 NV A NN 93 3 174 NV TUD IZ cines cota dE ETE anes 93 A A 94 351765 _ EA cee owed edieesaaw ened een
67. e square root of x in round up to positive infinity mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 40 Function Reference Fy Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 75 __nv_dsaqrt_rz Prototype double nv dsqrt rz double x Description Compute the square root of x in round towards zero mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 76 __nv_erf Prototype double nv erf double x Description X Calculate the value of the error function for the input argument x a e t dt TU 0 Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 41 Function Reference gt _ nv_erf 0 returns 0 gt _ nv_erf returns 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 77 NV _erc Prototype double nv erfc double x Description Calculate the complementary error function of the input argument x 1 erf x Returns gt
68. eturns NaN if x is not in the interval 0 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 245 nv_normcadfinvf Prototype float nv normcdfinvf float x Description Calculate the inverse of the standard normal cumulative distribution function for input argument y oy The function is defined for input values in the interval 0 1 Returns gt _ nv_normcdfinvf 0 returns oo gt _ nv_normcdfinv 1 returns gt _ nv_normcdfinvf x returns NaN if x is not in the interval 0 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 246 __nv_popc Prototype ise Gl in joc SA wx Description Count the number of bits that are set to 1 in x www nvidia com Libdevice User s Guide Part 000 _v5 5 129 Function Reference Returns Returns a value between 0 and 32 inclusive representing the number of set bits Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 247 __nv_popcll Prototype 132 nv popcll 164 x Description Count the number of bits that are set to 1 in x Returns Returns a value between 0 and 64 inclusive representing the number of set bits Library Availability Compute 2 0
69. eturns a value between 0 and 64 inclusive representing the position of the first bit set gt __nv_ffsll 0 returns 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 119 __nv_finitef Prototype aa y times Bello cie es Description Determine whether the floating point value x is a finite value Returns Returns a non zero value if and only if x is a finite value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 64 Function Reference 3 120 nv _float2half_rn Prototype dis ny Elocrdmeule sein ie lone 2 Description Convert the single precision float value x to a half precision floating point value represented in unsigned short format in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 121 nv _float2int_rd Prototype SE ny ElocueZ2abate satel alone wim Description Convert the single precision floating point value x to a signed integer in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 122 nv _float2int_rn Prototype 132 nv float2int rn float Sin www nvidia com Libdevice User s Guide Part 000 _v5 5 65 Function Reference Description Convert the singl
70. evice User s Guide Part 000 _v5 5 89 Function Reference 3 167 _ nv_fsqrt_rd Prototype float Q__nv_fsqrt_rd float x Description Compute the square root of x in round down to negative infinity mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 168 __nv_fsgrt_rn Prototype float nv_fsqrt_rn float x Description Compute the square root of x in round to nearest even mode Returns Returns Vx i For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 90 Function Reference 3 169 __ nv_fsqrt_ru Prototype float nv fsqrt_ru float x Description Compute the square root of x in round up to positive infinity mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 170 __nv_fsqrt_rz Prototype float nv fsqrt_rz float x Description Compute the square root of x in round towards zero mode Returns Returns Vx i For accuracy information for this function see the CUDA C Programming Guide Appendix C
71. f xXx y is an exact oo vo vv sv For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 147 nv_fmaf_rn Prototype Float ay sue mn ellogne Ses Eloet y Float s2 Description Computes the value of x x y Z as a single ternary operation rounding the result once in round to nearest even mode Returns Returns the rounded value of x x y Z as a single operation 0 z returns NaN 0 z returns NaN x y 00 returns NaN if x x y is an exact x y returns NaN if xX y is an exact o _nv_fmaf_rn _ nv_fmaf rn gt gt gt nv fmaf rn gt gt _ nv_fmaf rn For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 78 Function Reference 3 148 _ nv_fmaf_ru Prototype float nv fmaf ru float x float y float z Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round up to positive infinity mode Returns Returns the rounded value of x x y Z as a single operation gt _ nv fmaf ru o 0 z returns NaN gt _ nv_fmaf_ru 0 o z returns NaN gt _ nv_fmaf ru x y 00 returns NaN if x
72. fast approximate base 10 logarithm of the input argument x Returns Returns an approximation to lo g Ax For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Most input and output values around denormal range are flushed to sign preserving 0 0 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 56 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 105 __nv_fast_log2f Prototype float _ nv fast _log2f float x Description Calculate the fast approximate base 2 logarithm of the input argument x Returns Returns an approximation to lo gx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Input and output in the denormal range is flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 106 __nv_fast_logf Prototype alone mv fest logi ic L eNs Ex Description Calculate the fast approximate base e logarithm of the input argument x Returns Returns an approximation to log Ax For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 www nvidia com Libdevice User s Guide Part 000 _v5 5 57 Function Reference ME Most input and output values around denormal range are flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0
73. gned integer x Returns Returns the absolute value of the 64 bit signed integer x Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 212 __nv_llmax Prototype 164 nv llmax 164 x 164 Sy Description Determine the maximum value of the two 64 bit signed integers x and y Returns Returns the maximum value of the two 64 bit signed integers x and y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 213 nv_llmin Prototype 164 nv llmin 164 x 164 sy Description Determine the minimum value of the two 64 bit signed integers x and y Returns Returns the minimum value of the two 64 bit signed integers x and y www nvidia com Libdevice User s Guide Part 000 _v5 5 112 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 214 nv_llrint Prototype 164 nv llrint double x Description Round x to the nearest integer value with halfway cases rounded towards zero If the result is outside the range of the return type the result is undefined Returns Returns rounded integer value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 215 nv_llrintf Prototype od nee dto at Description Round x to the nearest integer value with halfway cases rounded towards zero If the result is outside the range of the return type the result is undefined Retur
74. he nearest integer value in floating point format with halfway cases rounded to the nearest even integer value Returns Returns rounded integer value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 260 nv_rintf Prototype lose Q my rimer e loci s2 Description Round x to the nearest integer value in floating point format with halfway cases rounded to the nearest even integer value Returns Returns rounded integer value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 138 Function Reference 3 261 nv_round Prototype double nv round double x Description Round x to the nearest integer value in floating point format with halfway cases rounded away from zero Returns Returns rounded integer value gt This function may be slower than alternate rounding methods See rint Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 262 nv_roundf Prototype float Q nv roundf float x Description Round x to the nearest integer value in floating point format with halfway cases rounded away from zero Returns Returns rounded integer value gt This function may be slower than alternate rounding methods See rint Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000
75. he signed 64 bit integer value x to a double precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 204 nv _ll2double_rn Prototype double nv 112double rn i64 1 www nvidia com Libdevice User s Guide Part 000 _v5 5 108 Function Reference Description Convert the signed 64 bit integer value x to a double precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 205 nv _ll2double ru Prototype double nv 112double ru i64 1 Description Convert the signed 64 bit integer value x to a double precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 206 nv_ll2double_rz Prototype double nv l112double rz 164 1 Description Convert the signed 64 bit integer value x to a double precision floating point value in round towards zero mode Returns Returns converted value www nvidia com Libdevice User s Guide Part 000 _v5 5 109 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 207 _ nv_ l2float_rd Prototype float nv 112float rd 164 1 Description
76. his function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 122 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 233 nv_mul24 Prototype 132 A ay mul24 i32 3x 132 oy Description Calculate the least significant 32 bits of the product of the least significant 24 bits of x and y The high order 8 bits of x and y are ignored Returns Returns the least significant 32 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 234 _nv_mul64hi Prototype 164 nv mul64hi 164 sx 164 Sy Description Calculate the most significant 64 bits of the 128 bit product x y where x and y are 64 bit integers Returns Returns the most significant 64 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 123 Function Reference 3 235 nv_mulhi Prototype E O oan abs ee LD2 Syw Description Calculate the most significant 32 bits of the 64 bit product x y where x and y are 32 bit integers Returns Returns the most significant 32 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 236 __nv_nan Prototype double nv nan i8 tagp Description Return a representation of a
77. his function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 180 __ nv_ilogb Prototype 132 nv ilogb double x Description Calculates the unbiased integer exponent of the input argument x Returns If successful returns the unbiased exponent of the argument __nv_ilogb 0 returns INT MIN __nv_ilogb NaN returns NaN __nv_ilogb x returns INT MAX if x is or the correct value is greater than INT MAX __nv_ilogb x return INT MIN if the correct value is less than INT MIN vo vo vv v www nvidia com Libdevice User s Guide Part 000 _v5 5 96 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 181 _ nv_ilogbf Prototype 132 nv _ilogbf float x Description Calculates the unbiased integer exponent of the input argument x Returns gt If successful returns the unbiased exponent of the argument gt _ nv_ilogbf 0 returns INT MIN gt __nv_ilogbf NaN returns NaN gt __nv_ilogbf x returns INT_MAX if x is or the correct value is greater than INT MAX __nv_ilogbf x return INT MIN if the correct value is less than INT_MIN v For accuracy information for this f
78. i A ea ces 56 3 105 NV_faSt_lOG2 cin a a eves E 57 3 106 A vised ensinede sicwacaa conde viens castes aise qua dneed OARRA RE REESE EAEEREN EEAS 57 3 107 IVA AS Oi A A senenanwed ene viel o 58 3 108 nV fast SINGOSE dismi A A AAA 58 3 109 ASA AA 59 3 110 NV asta 59 3 111 NV MM A Ad a E EEEE 60 MUZE TV Odd 61 IMSS MVE TIVA is sida 61 3 114 MVE Mio ESA ARO 62 A A ERA 62 3 116 PR RRA 63 35117 RN 63 341418 Mvision srta ladra adas 64 3 119 NV FIMICSR PPP ZA RO 64 341207 MV Tloat2Nalf Miu dia e 65 www nvidia com Libdevice User s Guide Part 000 _v5 5 iv AZ nv float2int is td ti 65 AA AA RE 65 3 123 NV HlOAtZINE Usina aria iea lots lilas 66 3 124 NV A A EAN 66 3 125 NV Tloat2 lluna it NAAA E 67 3 126 NV FlOAtZUL Mii ei 67 3 127 MVE lO Uca AAA IRA AA A 68 3 128 NV Noat rZ ia iii ias 68 3 129 Mv float2uint diia ir a A O gee EE AAA 69 3 130 NV AlOAtZUING I ici rt ads iaa 69 3 131 AV HlOAt2UINE nani Ad 69 3 132 OVA lO LUN EZ AA AR 70 3 133 NV TlOALZULL TA iii ie 70 3 134 NV float2ull Mii ii 71 3 135 nV float2ull Unai Aaa 71 3 136 NV float2ull Zi iein a EENE E E EE EEN 72 3 137 Mv float as Miserere nanoia a iD ia 72 3 138 NV AD i ceed E RE E EREA ETE E REE A R E ARTEN 72 3 139 MV FOOF PPP RR 73 3 140 NV TAR A 74 3 141 nV AMALIE ss sscsaescianas seaaavcdaae sbsieasdasedswsewt AA Aria 74 3 142 NV AMAZING sisanne arene baduvess ernesto nia aires 75 3 143 NV AMAL Uliss
79. ide Part 000 _v5 5 43 Function Reference Description Calculate the inverse complementary error function of the input argument y for y in the interval 0 2 The inverse complementary error function find the value x that satisfies the equation y erfc x for 0 lt y lt 2 and lt x lt Returns gt _ nv_erfcinvf 0 returns oo gt _ nv_erfcinvf 2 returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 81 __nv_erfcx Prototype double nv_erfcx double x Description Calculate the scaled complementary error function of the input argument x ex erfdx Returns gt _ nv_erfcx returns gt _ nv_erfcx returns 0 gt _ nv_erfcx x returns if the correctly calculated value is outside the double floating point range For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 44 Function Reference 3 82 __nv_erfcxf Prototype Pl Q ny errei Floci w2 Description Calculate the scaled complementary error function of the input argument x ex2 erfdx Returns gt _ nv_erfexf oo returns 00 gt _ nv_erfexf oo returns 0
80. iloint2double Prototype double nv hilloime2doublle 132 sx 132 sy Description Reinterpret the integer value of hi as the high 32 bits of a double precision floating point value and the integer value of 1o as the low 32 bits of the same double precision floating point value Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 178 __ nv_hypot Prototype double nv hypot double x double zy Description Calculate the length of the hypotenuse of a right triangle whose two sides have lengths x and y without undue overflow or underflow Returns Returns the length of the hypotenuse yx2 y If the correct value would overflow returns oo If the correct value would underflow returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 95 Function Reference 3 179 _ nv_hypotf Prototype float Q_ nv hypotf float x float Z y Description Calculate the length of the hypotenuse of a right triangle whose two sides have lengths x and y without undue overflow or underflow Returns Returns the length of the hypotenuse yx2 y If the correct value would overflow returns If the correct value would underflow returns 0 For accuracy information for t
81. ion will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 174 __nv_fsub_rz Prototype loci Q ny owg zz rloar ape Eloet ey Description Compute the difference of x and y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 93 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 175 nv_hadd Prototype 132 nv hadd i32 Sx i32 y Description Compute average of signed input arguments x and y as x y gt gt 1 avoiding overflow in the intermediate sum Returns Returns a signed integer value representing the signed average value of the two inputs Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 176 __nv_half2float Prototype float nv half2float i16 h Description Convert the half precision floating point value x represented in unsigned short format to a single precision floating point value Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 94 Function Reference 3 177 __nv_h
82. ird argument zptr Returns gt none See _ nv_sin and __nv_cos For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 144 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 273 nv_sincosf Prototype v idi Q mv sincosi loei gz loser este Ellogies SEET Description Calculate the sine and cosine of the first input argument x measured in radians The results for sine and cosine are written into the second argument sptr and respectively third argument zptr Returns gt none See _ nv_sinf and __nv_cosf For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 274 __nv_sincospi Prototype void Q nv _sincospi double x double sptr double Scptr Description Calculate the sine and cosine of the first input argument x measured in radians x TT The results for sine and cosine are written into the second argument sptr and respectively third argument zptr Returns gt none See __nv_sinpi and __nv_cospi www nvidia com Libdevice User s Guide Part 000 _v5 5 145 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Avai
83. lability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 275 __nv_sincospif Prototype mole CVSS COS Obata lO cel ssp Float sue lec epi Description Calculate the sine and cosine of the first input argument x measured in radians x TT The results for sine and cosine are written into the second argument spt r and respectively third argument zptr Returns gt none See __nv_sinpif and __nv_cospif For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 276 nv_sinf Prototype float nv sinf float x Description Calculate the sine of the input argument x measured in radians Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 146 Function Reference gt _ nv_sinf 0 returns 0 gt _ nv_sinf co returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 277 __nv_sinh Prototype double nv sinh double x Description Calculate the hyperbolic sine of the input argument x Returns gt _ nv_sinh 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3
84. le x Description Reinterpret the bits in the double precision floating point value x as a signed 64 bit integer Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 68 __nv_drcp_rd Prototype double nv drcp rd double x Description Compute the reciprocal of x in round down to negative infinity mode Returns Returns E For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 37 Function Reference 3 69 __nv_drcp_rn Prototype double Q_ nv _drcp_rn double x Description Compute the reciprocal of x in round to nearest even mode Returns Returns J For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 70 __nv_drcp_ru Prototype double __nv_drcp_ru double x Description Compute the reciprocal of x in round up to positive infinity mode Returns Returns 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes
85. libdevice The libdevice library ships as an LLVM bitcode library and is meant to be linked with the target module early in the compilation process The standard process for linking with libdevice is to first link it with the target module then run the standard LLVM optimization and code generation passes This allows the optimizers to inline and perform analyses on the used library functions and eliminate any used functions as dead code Users of libnvvm can link with libdevice by adding the appropriate libdevice module to the nvvmProgram object being compiled In addition the following options for nvvmCompileProgram affect the behavior of libdevice functions Table 1 Supported Reflection Parameters 0 preserve denormal values when performing p default single precision floating point operations EEZ 1 flush denormal values to zero when performing single precision floating point operations use a faster approximation for single precision floating point division and reciprocals prec div 1 use IEEE round to nearest mode for single default precision floating point division and reciprocals use IEEE round to nearest mode for single precision floating point square root prec sqrt default use a faster approximation for single precision floating point square root The following pseudo code shows an example of linking an NVVM IR module with the libdevice library using libnvvm nvvmProgram prog www nvidia com Libdevice Use
86. m Libdevice User s Guide Part 000 _v5 5 29 Function Reference Description Convert the double precision floating point value x to a signed integer value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 52 __nv_double2int_ru Prototype 132 nv double2int ru double d Description Convert the double precision floating point value x to a signed integer value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 53 __nv_double2int_rz Prototype 132 nv double2int rz double se Description Convert the double precision floating point value x to a signed integer value in round towards zero mode Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 30 Function Reference Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 54 nv_double2ll_rd Prototype 164 nv double211 rd double E Description Convert the double precision floating point value x to a signed 64 bit integer value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 55 nv_double2ll_rn Prototype 164 nv double211 rn double f Description
87. mpute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 251 __nv_powif Prototype float nv powif float x 132 y Description Calculate the value of x to the power of y Returns __nv_powif 0 y returns oo for y an integer less than 0 __nv_powif 0 y returns 0 for y an odd integer greater than 0 __nv_powif 0 y returns 0 for y gt 0 and not and odd integer __nv_powif 1 co returns 1 __nv_powif 1 y returns 1 for any y even a NaN __nv_powif x 0 returns 1 for any x even a NaN __nv_powif x y returns a NaN for finite x lt 0 and finite non integer y Yy v v Vv v v v yvy __nv_powif x co returns for lx lt 1 v _ nv_powif x returns 0 for lx gt 1 v __nv_powif x returns 0 for lxi lt 1 v __nv_powif x oo returns for lx gt 1 _ nv_powif y returns 0 for y an odd integer less than 0 _ nv_powif y returns 0 for y lt 0 and not an odd integer _ nv_powif y returns co for y an odd integer greater than 0 _ nv_powif oo y returns oo for y gt 0 and not an odd integer _ nv_powif y returns 0 for y lt 0 Vo vV v Vv v yv __nv_powif y returns for y gt 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 133 Function Reference Compute
88. n Prototype float nv ull2float rn 164 1 Description Convert the unsigned integer value x to a single precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 159 Function Reference 3 303 nv_ull2float_ru Prototype float nv ull2float ru i64 1 Description Convert the unsigned integer value x to a single precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 304 nv_ull2float_rz Prototype float U nv ull2float rz i164 1 Description Convert the unsigned integer value x to a single precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 305 nv_ullmax Prototype 164 nv ullmax 164 x 164 y www nvidia com Libdevice User s Guide Part 000 _v5 5 160 Function Reference Description Determine the maximum value of the two 64 bit unsigned integers x and y Returns Returns the maximum value of the two 64 bit unsigned integers x and y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 306 _ nv_ullmin Prototype 164 nv
89. n see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 8 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 10 nv_atan Prototype double nv atan double x Description Calculate the principal value of the arc tangent of the input argument x Returns Result will be in radians in the interval Tt 2 Tr 2 gt _ nv_atan 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 11 __nv_atan2 Prototype double nv atan2 double x double y Description Calculate the principal value of the arc tangent of the ratio of first and second input arguments x y The quadrant of the result is determined by the signs of inputs x and y Returns Result will be in radians in the interval TT TT gt _ nv_atan2 0 1 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 9 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 12 __nv_atan2f Prototype Eloat ay atan2 amp float sx Eloat sy Description Calculate the principal value of the arc tangent of the ratio of first and seco
90. nd input arguments x y The quadrant of the result is determined by the signs of inputs x and y Returns Result will be in radians in the interval Tr TT gt _ nv_atan2f 0 1 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 13 nv_atanf Prototype float nv atanf float x Description Calculate the principal value of the arc tangent of the input argument x Returns Result will be in radians in the interval TT 2 Tr 2 gt _ nv_atan 0 returns 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 10 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 14 _ nv_atanh Prototype double nv atanh double x Description Calculate the arc hyperbolic tangent of the input argument x Returns gt _ nv_atanh 0 returns 0 gt _ nv_atanh 1 returns gt _ nv_atanh x returns NaN for x outside interval 1 1 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 15 __nv_atanhf Prototype float nv atanhf float x Description
91. nf float x Description Calculate the tangent of the input argument x measured in radians Returns gt _ nv _tanf 0 returns 0 gt _ nv _tanf 00 returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 285 __nv_tanh Prototype double nv tanh double x Description Calculate the hyperbolic tangent of the input argument x Returns gt _ nv_tanh 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 151 Function Reference 3 286 nv_tanhf Prototype float nv tanhf float x Description Calculate the hyperbolic tangent of the input argument x Returns gt _ nv_tanhf 0 returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 287 __nv_tgamma Prototype double nv tgamma double x Description Calculate the gamma function of the input argument x namely the value of I ett dt Returns gt _ nv_tgamma 0 returns o gt _ nv_tgamma 2 returns 0 gt __nv_tgamma x returns if the c
92. ns Returns rounded integer value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 113 Function Reference 3 216 nv_llround Prototype 164 nv_llround double x Description Round x to the nearest integer value with halfway cases rounded away from zero If the result is outside the range of the return type the result is undefined Returns Returns rounded integer value gt This function may be slower than alternate rounding methods See llrint Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 217 nv _llroundf Prototype 164 nv llroundf float x Description Round x to the nearest integer value with halfway cases rounded away from zero If the result is outside the range of the return type the result is undefined Returns Returns rounded integer value gt This function may be slower than alternate rounding methods See llrint Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 114 Function Reference 3 218 __nv_log Prototype double nv log double x Description Calculate the base e logarithm of the input argument x Returns gt _ nv _log 0 returns oo gt _ nv _log 1 returns 0 gt _ nv _log x returns NaN for x lt 0 gt _ nv log ret
93. nv_log2f Prototype float nv_log2f float x Description Calculate the base 2 logarithm of the input argument x Returns gt _ nv log2f 0 returns oo gt _ nv _log2f 1 returns 0 gt _ nv log2f x returns NaN for x lt 0 gt _ nv_log2f returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 118 Function Reference 3 225 __nv_logb Prototype double nv logb double x Description Calculate the floating point representation of the exponent of the input argument x Returns gt _ nv logb Oreturns co gt _ nv logb returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 226 __nv_logbf Prototype float nv logbf float x Description Calculate the floating point representation of the exponent of the input argument x Returns gt _ nv logbf 0 returns oo gt _ nv logbf returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 119
94. of order 1 for the input argument x J x Returns Returns the value of the Bessel function of the first kind of order 1 gt _ nv_jlf 0 returns 0 gt _ nv jlf 00 returns 0 gt _ nv jlf NaN returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 197 __ nv_jn Prototype double nv jn i32 n double x www nvidia com Libdevice User s Guide Part 000 _v5 5 104 Function Reference Description Calculate the value of the Bessel function of the first kind of order n for the input argument x J Ax Returns Returns the value of the Bessel function of the first kind of order n gt _ nv jn n NaN returns NaN gt _ nv jn n x returns NaN for n lt 0 gt __nv_jn n co returns 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 198 _ nv_jnf Prototype Eloat my ne 32 on Eloat sx Description Calculate the value of the Bessel function of the first kind of order n for the input argument x J Ax Returns Returns the value of the Bessel function of the first kind of order n gt _ nv jnf n NaN returns NaN gt _ nv jnf n x returns NaN for n lt 0 gt _ nv jnf n co returns 0 For ac
95. ompute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 14 3 21 _nv_ceil Prototype double nv_ceil double x Description Compute the smallest integer value not less than x Returns Returns x expressed as a floating point number gt _ nv_ceil 0 returns 0 gt _ nv_ceil o returns Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 22 nv_ceilf Prototype lcet U my est Mellon wx Description Compute the smallest integer value not less than x Returns Returns x expressed as a floating point number gt _ nv_ceilf 0 returns 0 gt _ nv_ceilf oo returns Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Function Reference Part 000 _v5 5 15 Function Reference 3 23 __nv_clz Prototype is A my elatio 8 Description Count the number of consecutive leading zero bits starting at the most significant bit bit 31 of x Returns Returns a value between 0 and 32 inclusive representing the number of zero bits Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 24 nv_clzll Prototype 192 Q my ela oa ss Description Count the number of consecutive leading zero bits starting at the most significant bit bit 63 of x Returns Returns a value between 0 and
96. on for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 157 _ nv_fmul_rn Prototype float nv fmul rn float x float y Description Compute the product of x and y in round to nearest even mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 84 Function Reference 3 158 _ nv_fmul_ru Prototype float nv fmul ru float x float y Description Compute the product of x and y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 159 _nv_fmul_rz Prototype float ay mmal rz float x float ey Description Compute the product of x and y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C
97. on see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 38 nv_ddiv_rn Prototype double nv ddiv rn double x double y Description Divides two floating point values x by y in round to nearest even mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability www nvidia com Libdevice User s Guide Part 000 _v5 5 23 Function Reference Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 39 _ nv_ddiv_ru Prototype double nv ddiv ru double x double y Description Divides two floating point values x by y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 40 __nv_ddiv_rz Prototype double nv ddiv rz double x double S y Description Divides two floating point values x by y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 www nvidia com Libdevice User s
98. orrectly calculated value is outside the double floating point range gt __nv_tgamma x returns NaN if x lt 0 gt __nv_tgamma 00 returns NaN gt __nv_tgamma returns www nvidia com Libdevice User s Guide Part 000 _v5 5 152 Function Reference For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 288 __nv_tgammaf Prototype float Q nv tgammaf float x Description Calculate the gamma function of the input argument x namely the value of J etre lt Returns gt _ nv _tgammaf 0 returns gt _ nv _tgammaf 2 returns 0 gt _ nv _tgammaf x returns if the correctly calculated value is outside the double floating point range gt _ nv _tgammaf x returns NaN if x lt 0 gt _ nv _tgammaf 00 returns NaN gt _ nv _tgammaf returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 289 nv_trunc Prototype double nv trune double x Description www nvidia com Libdevice User s Guide Part 000 _v5 5 153 Function Reference Round x to the nearest integer value that does not exceed x in magnitude Returns Returns truncated integer value Library Availability Compute 2 0
99. ouble precision floating point value x to an unsigned integer value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 60 nv_double2uint_rn Prototype 132 Q nv double2uint_rn double d www nvidia com Libdevice User s Guide Part 000 _v5 5 33 Function Reference Description Convert the double precision floating point value x to an unsigned integer value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 61 nv_double2uint_ru Prototype 132 nv double2uint_ru double d Description Convert the double precision floating point value x to an unsigned integer value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 62 nv_double2uint_rz Prototype 132 nv double2uint_rz double d Description Convert the double precision floating point value x to an unsigned integer value in round towards zero mode Returns www nvidia com Libdevice User s Guide Part 000 _v5 5 34 Function Reference Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 63 nv_double2ull_rd Prototype 164 nv double2ull rd double sE Description Convert the
100. peration will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 21 Function Reference Compute 3 5 Yes 3 35 nv_dadd_ru Prototype double nv dadd ru double x double y Description Adds two floating point values x and y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 36 nv_dadd_rz Prototype double nv dadd rz double x double S y Description Adds two floating point values x and y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 22 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 37 nv_ddiv_rd Prototype double nv ddiv rd double x double y Description Divides two floating point values x by y in round down to negative infinity mode Returns Returns x y For accuracy information for this functi
101. proximation to 10 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Most input and output values around denormal range are flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 102 __ nv_fast_expf Prototype float nv fast expf float x Description Calculate the fast approximate base e exponential of the input argument x e Returns Returns an approximation to e For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Most input and output values around denormal range are flushed to sign preserving 0 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 55 Function Reference 3 103 _ nv_fast_fdividef Prototype float nv fast fdividef float x float y Description Calculate the fast approximate division of x by y Returns Returns x y gt _ nv fast _fdividef oo y returns NaN for 2126 lt y lt gran nv fast fdividef x y returns 0 for 2120 lt y lt 2128 and x oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 4 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 104 __nv_fast_log10f Prototype float nv _fast_logl0f float x Description Calculate the
102. quiet NaN Argument tagp selects one of the possible representations Returns gt _ nv_nan tagp returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 124 Function Reference 3 237 nv_nanf Prototype float nv nanf i8 Stagp Description Return a representation of a quiet NaN Argument tagp selects one of the possible representations Returns gt _ nv_nanf tagp returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 238 __ nv_nearbyint Prototype double nv nearbyint double x Description Round argument x to an integer value in double precision floating point format Returns _ nv_nearbyint 0 returns 0 gt _ nv_nearbyint returns o For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 125 Function Reference Compute 3 5 Yes 3 239 __nv_nearbyintf Prototype float Q_ nv nearbyintf float x Description Round argument x to an integer value in double precision floating point fo
103. r s Guide Part 000 _v5 5 2 Basic Usage size t libdeviceModSize const char libdeviceMod loadFile path to libdevice bc amp libdeviceModSize const char myIr NVVM IR in text or binary format Sale ls MALTS ALAS gt 04 sigo TONE myr aa ces 47 7 Create NVVM program object nvvmCreateProgram amp prog Add libdevice module to program nvvmAddModuleToProgram prog libdeviceMod libdeviceModSize Add custom IR to program nvvmAddModuleToProgram prog mylr mylrSize Declare compile options consti ehar Cope rons je Compile the program nvvmCompileProgram prog 1 options It is the responsibility of the client program to locate and read the libdevice library binary represented by the loadFile function in the example 2 2 Selecting Library Version The libdevice library ships with several versions each tuned for optimal performance on a particular device architecture The following table provides a guideline for choosing the best libdevice version for the target architecture All versions can be found in the CUDA Toolkit under nvvm libdevice lt library name gt Table 2 Library version selection guidelines libdevice compute 20 XX bc Arch 3 0 libdevice compute 30 XX bc 3 1 lt Arch lt 3 5 libdevice compute 20 XX bc Arch 3 5 libdevice compute 35 XX bc The XX in the library name corresponds to the libdevice library release number Each release of the lib
104. r this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 81 Function Reference 3 153 nv_fminf Prototype float nv fminf float x float Sy Description Determines the minimum numeric value of the arguments x and y Treats NaN arguments as missing data If one argument is a NaN and the other is legitimate numeric value the numeric value is chosen Returns Returns the minimum numeric values of the arguments x and y gt If both arguments are NaN returns NaN gt If one argument is NaN returns the numeric argument For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 154 nv_fmod Prototype double nv fmod double sx double Z y Description Calculate the floating point remainder of x y The absolute value of the computed value is always less than y s absolute value and will have the same sign as x Returns gt Returns the floating point remainder of x y gt _ nv_fmod 0 y returns 0 if y is not zero gt _ nv_fmod x y returns NaN and raised an invalid floating point exception if x is coor y is zero gt _ nv_fmod x y returns zero if y is zero or the result would overflow gt _ nv_fmod x
105. ription Calculate the nonnegative square root of x Vx Returns Returns Vx gt _ nv _sqrt 0 returns 0 gt _ nv_sqrt 00 returns gt _ nv_sqrt x returns NaN if x is less than 0 For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 282 __ nv_sartf Prototype ioe ES o it www nvidia com Libdevice User s Guide Part 000 _v5 5 149 Function Reference Description Calculate the nonnegative square root of x Vx Returns Returns Vx gt _ nv_sqrtf 0 returns 0 gt _ nv_sqrtf returns oo gt _ nv_sqrtf x returns NaN if x is less than 0 gt For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 283 __nv_tan Prototype double nv tan double x Description Calculate the tangent of the input argument x measured in radians Returns gt _ nv_tan 0 returms 0 gt _nv_tan returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 150 Function Reference 3 284 nv_tanf Prototype float nv ta
106. rmat Returns __nv_nearbyintf 0 returns 0 gt _ nv_nearbyintf returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 240 nv_nextafter Prototype double f nv nextafter double x double Z y Description Calculate the next representable double precision floating point value following x in the direction of y For example if y is greater than x nextafter returns the smallest representable number greater than x Returns gt _ nv_nextafter co y returns oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 126 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 241 nv_nextafterf Prototype float Q nv nextafterf float exp float ey Description Calculate the next representable double precision floating point value following x in the direction of y For example if y is greater than x nextafter returns the smallest representable number greater than x Returns gt _ nv_nextafterf 00 y returns o For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 242
107. rns NaN gt If one argument is NaN returns the numeric argument For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 151 __ nv_fmaxf Prototype float C my mieri loet sx Sloc cy Description www nvidia com Libdevice User s Guide Part 000 _v5 5 80 Function Reference Determines the maximum numeric value of the arguments x and y Treats NaN arguments as missing data If one argument is a NaN and the other is legitimate numeric value the numeric value is chosen Returns Returns the maximum numeric values of the arguments x and y gt If both arguments are NaN returns NaN gt If one argument is NaN returns the numeric argument For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 152 __ nv_fmin Prototype double nv fmin double x double Z y Description Determines the minimum numeric value of the arguments x and y Treats NaN arguments as missing data If one argument is a NaN and the other is legitimate numeric value the numeric value is chosen Returns Returns the minimum numeric values of the arguments x and y gt If both arguments are NaN returns NaN gt If one argument is NaN returns the numeric argument For accuracy information fo
108. s 3 141 nv_fma_rd Prototype double nv fma rd double x double sy double z Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round down to negative infinity mode Returns Returns the rounded value of x X y Z as a single operation gt nv_fma_rd o 0 z returns NaN gt _ nv_fma_rd 0 z returns NaN gt _ nv_fma_rd x y returns NaN if XX y is an exact oo www nvidia com Libdevice User s Guide Part 000 _v5 5 74 Function Reference gt _ nv_fma_rd x y 00 returns NaN if x x y is an exact oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 142 __nv_fma_rn Prototype double nv fma rn double x double Sy double z Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round to nearest even mode Returns Returns the rounded value of x X y Z as a single operation gt _ nv_fma_rn 0 z returns NaN gt _ nv_fma_rm 0 z returns NaN gt _ nv_fma_rn x y 00 returns NaN if XX y is an exact co gt _ nv_fma_rm x y co returns NaN if XX y is an exact oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0
109. s NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 32 __nv_cospif Prototype float nv cospif float x Description Calculate the cosine of x X TT measured in radians where x is the input argument Returns gt _ nv_cospif 0 returns 1 gt _ nv_cospif returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 20 Function Reference 3 33 __nv_dadd_rd Prototype double nv dadd rd double x double y Description Adds two floating point values x and y in round down to negative infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This operation will never be merged into a single multiply add instruction Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 34 __nv_dadd_rn Prototype double nv dadd rn double x double y Description Adds two floating point values x and y in round to nearest even mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 This o
110. t 000 _v5 5 vi 3 207 MV UR lO ii ls 110 3 208 NV ZO at ii gubsees teasceea seat hees enobedaeasetnnds e e 110 3 209 MV float T sensor ran andadas 111 3 210 MV Ifloat vaso ries a ln iaa ais an 111 ZU 2 NV la Si Ae A A 111 3 212 MOM id 112 3 213 NVM IM cris ads RAR ESAE ont 112 3 214 NVALMIN iii cdi bio 113 3 215 A RAR 113 3 216 NV lO iii a EAE RRE EA EEAO KA 114 3217 AR 114 3 218 A NEE ENEE 115 3219 O AAA EE AA E E ERN 115 3 220 MO Mii ao 116 A A 1 Piiscs sca cenecans ceadhavsectevscaieaaddsened A oi dttensvardeneasans 116 3122230 MV o ETE E E T E as 117 3 223 A A E dbac odie aedivedaebreees 117 E A A E EE E AT AE EA E EA E ET E 118 J223 A A a e E E 119 3 226 MV AOSD arosai re nane Ee E A E NEEE AEREE Ee ESEA EEAS E 119 8 227 A NS 120 3 228 __nv_longlong_as_double oooocococccroonccrocncononcnoroncrrocorononornronronococanon oso 120 E NV MAX ARNO 121 3 2307 MV MIN ii AAA AA AR AA AA as 121 3 2315 NV MO riera ar tall a 121 II ANN 122 8 233 MV MUI A ii AA A A 123 3 234 NV MULG4N yas cate resero ri a AA e 123 3 235 NV A AN 124 3 236 NV MAN neeese eiie AEE A AAA RR 124 3 237 NV NaN eerren ariii A vena se A ia 125 3 238 MV NOD Miri EEA TERE E 125 3 239 IMC Mic Ai 126 3 240 Mv Next der s ia E OET ES ESERE EE EEEO EEE EEA 126 3 241 MV Neta denia 127 3 242 MV NOMGA int a 127 3 243 MV NOrmMGdf f anioien iiine ina RRA 128 3 244 AV MOMIMCAPINV acaricio 128 3 245 nV NOPMC
111. type float nv double2float_ru double d Description Convert the double precision floating point value x to a single precision floating point value in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 48 nv_double2float_rz Prototype float nv double2float_rz double d Description Convert the double precision floating point value x to a single precision floating point value in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 28 Function Reference 3 49 nv_double2hiint Prototype 132 nv double2hiint double d Description Reinterpret the high 32 bits in the double precision floating point value x as a signed integer Returns Returns reinterpreted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 50 nv_double2int_rd Prototype 132 nv double2int rd double d Description Convert the double precision floating point value x to a signed integer value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 51 __nv_double2int_rn Prototype 132 nv double2int rn double d www nvidia co
112. uble nv yl double x Description Calculate the value of the Bessel function of the second kind of order 1 for the input argument x Y x Returns Returns the value of the Bessel function of the second kind of order 1 __nv_y1 0 returns oo __nv_y1 x returns NaN for x lt 0 __nv_yl returns 0 __nv_yl NaN returns NaN v v vv For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 317 nv_ylf Prototype float nv ylf float x www nvidia com Libdevice User s Guide Part 000 _v5 5 166 Function Reference Description Calculate the value of the Bessel function of the second kind of order 1 for the input argument x Y x Returns Returns the value of the Bessel function of the second kind of order 1 __nv_ylf 0 returns oo __nv_ylf x returns NaN for x lt 0 __nv_ylf 00 returns 0 __nv_ylf NaN returns NaN v v v y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 318 __nv_yn Prototype double nv_yn i32 n double x Description Calculate the value of the Bessel function of the second kind of order n for the input argument x Y Ax Returns Returns the value of the Bessel function of the second kind of order n
113. ullmin i64 x 164 y Description Determine the minimum value of the two 64 bit unsigned integers x and y Returns Returns the minimum value of the two 64 bit unsigned integers x and y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 307 __nv_umax Prototype 132 Cv ia Sl 132 sy Description Determine the maximum value of the two 32 bit unsigned integers x and y Returns Returns the maximum value of the two 32 bit unsigned integers x and y www nvidia com Libdevice User s Guide Part 000 _v5 5 161 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 308 __nv_umin Prototype 132 nv umin 132 x 132 Sy Description Determine the minimum value of the two 32 bit unsigned integers x and y Returns Returns the minimum value of the two 32 bit unsigned integers x and y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 309 nv_umul24 Prototype 132 nv umul24 132 cx 132 cy Description Calculate the least significant 32 bits of the product of the least significant 24 bits of x and y The high order 8 bits of x and y are ignored Returns Returns the least significant 32 bits of the product x y Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 162 Function Reference 3 310 _ nv_umul64hi
114. unction see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 182 nv_int2double_rn Prototype double nv int2double rn i32 1 Description Convert the signed integer value x to a double precision floating point value www nvidia com Libdevice User s Guide Part 000 _v5 5 97 Function Reference Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 183 nv_int2float_rd Prototype loci my smte Preteens mais im Description Convert the signed integer value x to a single precision floating point value in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 184 __nv_int2float_rn Prototype float O nv _int2float rn i32 Sin Description Convert the signed integer value x to a single precision floating point value in round to nearest even mode Returns Returns converted value Library Availability Compute 2 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 98 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 185 nv_int2float_ru Prototype float Q nv int2float _ ru i32 Sin Description Convert the signed integer value x to a single precision floating point value in round up to positive infinity mode Returns
115. urns co For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 219 _ nv_log10 Prototype double nv logl0 double x Description Calculate the base 10 logarithm of the input argument x Returns gt _ nv _logl0 0 returns oo gt _ nv_logl0 1 returns 0 gt _ nv logl0 x returns NaN for x lt 0 gt _ nv logl0 00 returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 www nvidia com Libdevice User s Guide Part 000 _v5 5 115 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 220 __nv_log10f Prototype float nv logl0f float x Description Calculate the base 10 logarithm of the input argument x Returns gt _ nv _logl0f 0 returns oo gt _ nv _logl0f 1 returns 0 gt _ nv _logl0f x returns NaN for x lt 0 gt __nv_log10f returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 221 __nv_log1p Prototype double nv loglp double x Description Calculate the value of log dde x of the input argument x Returns gt _ nv_loglp 0 returns oo gt _
116. va loa ti Cloc oy Description Divide two floating point values x by y in round up to positive infinity mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 62 Function Reference Compute 3 5 Yes 3 116 _ nv fdiv_rz Prototype elos my inchiy raliloar ssp loeit ey Description Divide two floating point values x by y in round towards zero mode Returns Returns x y For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 117 nv ffs Prototype 1S2 Q oy iS S25 sox Description Find the position of the first least significant bit set to 1 in x where the least significant bit position is 1 Returns Returns a value between 0 and 32 inclusive representing the position of the first bit set gt _ nv_ffs 0 returns 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 63 3 118 nv ffsll Prototype LDA A ay Sala E Description Function Reference Find the position of the first least significant bit set to 1 in x where the least significant bit position is 1 Returns R
117. verted value Library Availability Compute 2 0 Yes Compute 3 0 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 67 Function Reference Compute 3 5 Yes 3 127 nv _float2ll_ ru Prototype at my selene 2 LL sem locus ez Description Convert the single precision floating point value x to a signed 64 bit integer in round up to positive infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 128 nv _float2ll_rz Prototype oa Q my Elo ie elles kt Description Convert the single precision floating point value x to a signed 64 bit integer in round towards zero mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 68 Function Reference 3 129 nv _float2uint_rd Prototype asa Q my El Oaite Vliliame ToO osm Description Convert the single precision floating point value x to an unsigned integer in round down to negative infinity mode Returns Returns converted value Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 130 __nv_float2uint_rn Prototype asa Q ny floeat2vime railcar wim Description Convert the single precision floating point value x to an unsigned integer in round to nearest even mode Returns Returns converted value
118. www nvidia com Libdevice User s Guide Part 000 _v5 5 38 Function Reference Compute 3 0 Yes Compute 3 5 Yes 3 71 __nv_drcp_rz Prototype double nv drcp rz double x Description Compute the reciprocal of x in round towards zero mode Returns Returns For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 72 __nv_dsqrt_rd Prototype double nv _dsqrt_rd double x Description Compute the square root of x in round down to negative infinity mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 39 Function Reference Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 73 __nv_dsqrt_rn Prototype double nv _dsqrt_rn double x Description Compute the square root of x in round to nearest even mode Returns Returns Vx For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Requires compute capability gt 2 0 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 74 __nv_dsart_ru Prototype double nv _dsqrt_ru double x Description Compute th
119. x y Z Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes www nvidia com Libdevice User s Guide Part 000 _v5 5 164 Function Reference 3 314 __nv_y0 Prototype double nv y0 double x Description Calculate the value of the Bessel function of the second kind of order 0 for the input argument x Y x Returns Returns the value of the Bessel function of the second kind of order 0 __nv_y0 0 returns __nv_y0 x returns NaN for x lt 0 __nv_y0 00 returns 0 __nv_y0 NaN returns NaN v v v v For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 315 __nv_y0f Prototype float nv y0f float x Description Calculate the value of the Bessel function of the second kind of order 0 for the input argument x Y dx Returns Returns the value of the Bessel function of the second kind of order 0 gt _ nv_y0f 0 returns oo gt _ nv y0f x returns NaN for x lt 0 gt _ nv y0f co returns 0 www nvidia com Libdevice User s Guide Part 000 _v5 5 165 Function Reference gt _ nv_y0f NaN returns NaN For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 2 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 316 __nv_y1 Prototype do
120. x y is an exact gt _ nv_fmaf ru x y returns NaN if xx y is an exact oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 149 __nv_fmaf_rz Prototype close ay tmas e elos ssp Elec ty Cloet tz Description Computes the value of xXx y Z as a single ternary operation rounding the result once in round towards zero mode Returns Returns the rounded value of x X y Z as a single operation gt _ nv_fmaf_rz 0 z returns NaN gt _ nv_fmaf_rz 0 z returns NaN gt _ nv_fmaf rz x y returns NaN if XX y is an exact oo www nvidia com Libdevice User s Guide Part 000 _v5 5 79 Function Reference gt _ nv_fmaf rz x y returns NaN if x x y is an exact oo For accuracy information for this function see the CUDA C Programming Guide Appendix C Table C 1 Library Availability Compute 2 0 Yes Compute 3 0 Yes Compute 3 5 Yes 3 150 __nv_fmax Prototype double nv fmax double x double Z y Description Determines the maximum numeric value of the arguments x and y Treats NaN arguments as missing data If one argument is a NaN and the other is legitimate numeric value the numeric value is chosen Returns Returns the maximum numeric values of the arguments x and y gt If both arguments are NaN retu
Download Pdf Manuals
Related Search
Related Contents
P5/20PS - P9/16PS R8/17PS(+) - R120/11PS(+) Istruzioni per l`uso Tulip User Manual PRESENTATION DE CE MODE D`EMPLOI Operating Instructions Type 2030, 2031, 2031 K User Manual of ATC-1000 Frigidaire FFRA0522Q1 Product Specifications Sheet Copyright © All rights reserved.
Failed to retrieve file