home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / f90 / intro_intrin.z / intro_intrin
Encoding:
Text File  |  2002-10-03  |  12.7 KB  |  584 lines

  1. INTRO_INTRIN(3I)                                      Last changed: 4-13-99
  2.  
  3.  
  4. NNAAMMEE
  5.      IINNTTRROO__IINNTTRRIINN - Introduction to intrinsic procedures
  6.  
  7. IIMMPPLLEEMMEENNTTAATTIIOONN
  8.      UNICOS, UNICOS/mk, and IRIX systems
  9.  
  10.      CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
  11.  
  12. DDEESSCCRRIIPPTTIIOONN
  13.      _I_n_t_r_i_n_s_i_c _p_r_o_c_e_d_u_r_e_s are predefined procedures that are defined by the
  14.      computer programming language.  They are invoked in the same way that
  15.      other procedures are invoked.
  16.  
  17.      The Fortran standard defines intrinsic procedures, and the CF90 and
  18.      MIPSpro 7 Fortran 90 compilers support all the intrinsics described in
  19.      the Fortran 95 standard.  The CF90 and MIPSpro 7 Fortran 90 compilers
  20.      support other intrinsics as extensions to the standard.  The MIPSpro
  21.      Fortran 77 compiler conforms to the outmoded FORTRAN 77 standard; the
  22.      intrinsics supported by this compiler are fewer in number than those
  23.      supported by the CF90 and MIPSpro 7 Fortran 90 compilers.
  24.  
  25.      There are four classes of Fortran intrinsic procedures as defined by
  26.      the Fortran 95 standard:  inquiry functions, elemental functions,
  27.      transformational functions, and subroutines.  Additional intrinsics
  28.      provided with the CF90 and MIPSpro 7 Fortran 90 compiler include
  29.      intrinsics that support IEEE floating-point arithmetic and other
  30.      compiler extensions.
  31.  
  32.      The CF90 and MIPSpro 7 Fortran 90 compilers evaluate intrinsic
  33.      procedures in line or by calling external code.  Depending on your
  34.      platform and your program, the following intrinsics can be evaluated
  35.      in line:
  36.  
  37.      * AABBSS
  38.  
  39.      * AACCHHAARR
  40.  
  41.      * AAIIMMAAGG
  42.  
  43.      * AAIINNTT
  44.  
  45.      * AALLLL
  46.  
  47.      * AANNDD
  48.  
  49.      * AANNIINNTT
  50.  
  51.      * AANNYY
  52.  
  53.      * BBIITT__SSIIZZEE
  54.  
  55.      * MM@@CCLLRR, MM@@LLDD, MM@@MMXX, MM@@LLDDMMXX, MM@@UULL (the BMM intrinsics)
  56.  
  57.      * BBTTEESSTT
  58.  
  59.      * CCEEIILLIINNGG
  60.  
  61.      * CCHHAARR, IICCHHAARR
  62.  
  63.      * CCLLEEAARR__IIEEEEEE__EEXXCCEEPPTTIIOONN
  64.  
  65.      * CCLLOOCC
  66.  
  67.      * CCMMPPLLXX
  68.  
  69.      * CCOOMMPPLL
  70.  
  71.      * CCOONNJJGG
  72.  
  73.      * CCOOUUNNTT
  74.  
  75.      * CCSSHHIIFFTT
  76.  
  77.      * CCSSMMGG
  78.  
  79.      * CCVVMMGGMM, CCVVMMGGNN, CCVVMMGGPP, CCVVMMGGZZ, CCVVMMGGTT
  80.  
  81.      * DDBBLLEE
  82.  
  83.      * DDIIGGIITTSS
  84.  
  85.      * DDIIMM
  86.  
  87.      * DDIISSAABBLLEE__IIEEEEEE__IINNTTEERRRRUUPPTT
  88.  
  89.      * DDOOTT__PPRROODDUUCCTT
  90.  
  91.      * DDPPRROODD
  92.  
  93.      * DDSSHHIIFFTTLL
  94.  
  95.      * DDSSHHIIFFTTRR
  96.  
  97.      * EENNAABBLLEE__IIEEEEEE__IINNTTEERRRRUUPPTT
  98.  
  99.      * EEOOSSHHIIFFTT
  100.  
  101.      * EEPPSSIILLOONN
  102.  
  103.      * EEQQVV
  104.  
  105.      * EEXXPPOONNEENNTT
  106.  
  107.      * FFCCDD
  108.  
  109.      * FFLLOOOORR
  110.  
  111.      * FFLLOOAATT
  112.  
  113.      * FFRRAACCTTIIOONN
  114.  
  115.      * GGEETT__IIEEEEEE__EEXXCCEEPPTTIIOONNSS
  116.  
  117.      * GGEETT__IIEEEEEE__IINNTTEERRRRUUPPTTSS
  118.  
  119.      * GGEETT__IIEEEEEE__RROOUUNNDDIINNGG__MMOODDEE
  120.  
  121.      * GGEETT__IIEEEEEE__SSTTAATTUUSS
  122.  
  123.      * HHUUGGEE
  124.  
  125.      * II2244MMUULLTT
  126.  
  127.      * IIAACCHHAARR
  128.  
  129.      * IIAANNDD
  130.  
  131.      * IIBBCCLLRR
  132.  
  133.      * IIBBIITTSS
  134.  
  135.      * IIBBSSEETT
  136.  
  137.      * IIEEEEEE__CCLLAASSSS
  138.  
  139.      * IIEEEEEE__CCOOPPYY__SSIIGGNN
  140.  
  141.      * IIEEEEEE__FFIINNIITTEE
  142.  
  143.      * IIEEEEEE__IINNTT
  144.  
  145.      * IIEEEEEE__IISS__NNAANN
  146.  
  147.      * IIEEEEEE__RREEAALL
  148.  
  149.      * IIEEEEEE__UUNNOORRDDEERREEDD
  150.  
  151.      * IIEEOORR
  152.  
  153.      * IINNTT
  154.  
  155.      * IINNTT__MMUULLTT__UUPPPPEERR
  156.  
  157.      * IIOORR
  158.  
  159.      * IISSHHFFTT
  160.  
  161.      * IISSHHFFTTCC
  162.  
  163.      * KKIINNDD
  164.  
  165.      * LLBBOOUUNNDD
  166.  
  167.      * LLEEAADDZZ
  168.  
  169.      * LLEENN
  170.  
  171.      * LLGGEE, LLGGTT, LLLLEE, LLLLTT
  172.  
  173.      * LLOOCC
  174.  
  175.      * LLOOGGIICCAALL
  176.  
  177.      * MMAASSKK
  178.  
  179.      * MMAATTMMUULL
  180.  
  181.      * MMAAXX
  182.  
  183.      * MMAAXXEEXXPPOONNEENNTT
  184.  
  185.      * MMAAXXLLOOCC
  186.  
  187.      * MMAAXXVVAALL
  188.  
  189.      * MMEEMMOORRYY__BBAARRRRIIEERR
  190.  
  191.      * MMEERRGGEE
  192.  
  193.      * MMIINN
  194.  
  195.      * MMIINNEEXXPPOONNEENNTT
  196.  
  197.      * MMIINNVVAALL
  198.  
  199.      * MMOODD, AAMMOODD
  200.  
  201.      * MMOODDUULLOO
  202.  
  203.      * MMVVBBIITTSS
  204.  
  205.      * MMYY__PPEE
  206.  
  207.      * NNEEAARREESSTT
  208.  
  209.      * NNEEQQVV, XXOORR
  210.  
  211.      * NNIINNTT
  212.  
  213.      * NNOOTT
  214.  
  215.      * NNUUMMAARRGG
  216.  
  217.      * OORR
  218.  
  219.      * PPOOPPCCNNTT
  220.  
  221.      * PPOOPPPPAARR
  222.  
  223.      * PPRREECCIISSIIOONN
  224.  
  225.      * PPRREESSEENNTT
  226.  
  227.      * PPRROODDUUCCTT
  228.  
  229.      * RRAADDIIXX
  230.  
  231.      * RRAANNGGEE
  232.  
  233.      * RREEAALL
  234.  
  235.      * RREEMMOOTTEE__WWRRIITTEE__BBAARRRRIIEERR
  236.  
  237.      * RRRRSSPPAACCIINNGG
  238.  
  239.      * RRTTCC, IIRRTTCC
  240.  
  241.      * SSCCAALLEE
  242.  
  243.      * SSEELLEECCTTEEDD__IINNTT__KKIINNDD
  244.  
  245.      * SSEETT__EEXXPPOONNEENNTT
  246.  
  247.      * SSEETT__IIEEEEEE__EEXXCCEEPPTTIIOONN
  248.  
  249.      * SSEETT__IIEEEEEE__EEXXCCEEPPTTIIOONNSS
  250.  
  251.      * SSEETT__IIEEEEEE__IINNTTEERRRRUUPPTTSS
  252.  
  253.      * SSEETT__IIEEEEEE__RROOUUNNDDIINNGG__MMOODDEE
  254.  
  255.      * SSEETT__IIEEEEEE__SSTTAATTUUSS
  256.  
  257.      * SSHHAAPPEE
  258.  
  259.      * SSHHIIFFTT
  260.  
  261.      * SSHHIIFFTTAA
  262.  
  263.      * SSHHIIFFTTLL
  264.  
  265.      * SSHHIIFFTTRR
  266.  
  267.      * SSIIGGNN
  268.  
  269.      * SSPPAACCIINNGG
  270.  
  271.      * SSPPRREEAADD
  272.  
  273.      * SSUUMM
  274.  
  275.      * SSYYSSTTEEMM__CCLLOOCCKK
  276.  
  277.      * TTEESSTT__IIEEEEEE__EEXXCCEEPPTTIIOONN
  278.  
  279.      * TTEESSTT__IIEEEEEE__IINNTTEERRRRUUPPTT
  280.  
  281.      * TTIINNYY
  282.  
  283.      * TTRRAANNSSFFEERR
  284.  
  285.      * TTRRAANNSSPPOOSSEE
  286.  
  287.      * UUBBOOUUNNDD
  288.  
  289.      * WWRRIITTEE__MMEEMMOORRYY__BBAARRRRIIEERR
  290.  
  291.      The CF90 compiler supports vector versions of some intrinsic
  292.      procedures.  Using one of these intrinsics means that the presence of
  293.      the intrinsic itself, in a loop, does not inhibit the loop's ability
  294.      to vectorize.  Vector versions of the following CF90 intrinsic
  295.      procedures exist on UNICOS platforms:
  296.  
  297.      * AABBSS
  298.  
  299.      * AACCOOSS, DDAACCOOSS
  300.  
  301.      * AAIIMMAAGG
  302.  
  303.      * AAIINNTT
  304.  
  305.      * AANNDD
  306.  
  307.      * AANNIINNTT
  308.  
  309.      * AASSIINN
  310.  
  311.      * AATTAANN
  312.  
  313.      * AATTAANN22
  314.  
  315.      * BBIITT__SSIIZZEE
  316.  
  317.      * MM@@CCLLRR, MM@@LLDD, MM@@MMXX, MM@@LLDDMMXX, and MM@@UULL (the BMM intrinsics)
  318.  
  319.      * BBTTEESSTT
  320.  
  321.      * CCEEIILLIINNGG
  322.  
  323.      * CCMMPPLLXX
  324.  
  325.      * CCOOMMPPLL
  326.  
  327.      * CCOONNJJGG
  328.  
  329.      * CCOOSS
  330.  
  331.      * CCOOSSHH, DDCCOOSSHH
  332.  
  333.      * CCOOTT, DDCCOOTT
  334.  
  335.      * CCSSMMGG
  336.  
  337.      * CCVVMMGGMM, CCVVMMGGNN, CCVVMMGGPP, CCVVMMGGZZ, CCVVMMGGTT
  338.  
  339.      * DDBBLLEE, DDFFLLOOAATT
  340.  
  341.      * DDIIGGIITTSS
  342.  
  343.      * DDIIMM
  344.  
  345.      * DDPPRROODD
  346.  
  347.      * DDSSHHIIFFTTLL
  348.  
  349.      * DDSSHHIIFFTTRR
  350.  
  351.      * EEPPSSIILLOONN
  352.  
  353.      * EEQQVV
  354.  
  355.      * EEXXPP
  356.  
  357.      * EEXXPPOONNEENNTT
  358.  
  359.      * FFLLOOOORR
  360.  
  361.      * FFRRAACCTTIIOONN
  362.  
  363.      * HHUUGGEE
  364.  
  365.      * II2244MMUULLTT
  366.  
  367.      * IIAANNDD
  368.  
  369.      * IIBBCCLLRR
  370.  
  371.      * IIBBIITTSS
  372.  
  373.      * IIBBSSEETT
  374.  
  375.      * IIEEEEEE__CCLLAASSSS
  376.  
  377.      * IIEEEEEE__CCOOPPYY__SSIIGGNN
  378.  
  379.      * IIEEEEEE__FFIINNIITTEE
  380.  
  381.      * IIEEEEEE__IINNTT
  382.  
  383.      * IIEEEEEE__IISS__NNAANN
  384.  
  385.      * IIEEEEEE__RREEAALL
  386.  
  387.      * IIEEEEEE__UUNNOORRDDEERREEDD
  388.  
  389.      * IIEEOORR
  390.  
  391.      * IINNTT, IIDDIINNTT, IIFFIIXX
  392.  
  393.      * IINNTT__MMUULLTT__UUPPPPEERR
  394.  
  395.      * IIOORR
  396.  
  397.      * IISSHHFFTT
  398.  
  399.      * IISSHHFFTTCC
  400.  
  401.      * KKIINNDD
  402.  
  403.      * LLEEAADDZZ
  404.  
  405.      * LLOOGG
  406.  
  407.      * LLOOGG1100
  408.  
  409.      * LLOOGGIICCAALL
  410.  
  411.      * MMAASSKK
  412.  
  413.      * MMAAXX
  414.  
  415.      * MMAAXXEEXXPPOONNEENNTT
  416.  
  417.      * MMEERRGGEE
  418.  
  419.      * MMIINN
  420.  
  421.      * MMIINNEEXXPPOONNEENNTT
  422.  
  423.      * MMOODD
  424.  
  425.      * MMVVBBIITTSS
  426.  
  427.      * NNEEAARREESSTT
  428.  
  429.      * NNEEQQVV, XXOORR
  430.  
  431.      * NNIINNTT
  432.  
  433.      * NNOOTT
  434.  
  435.      * OORR
  436.  
  437.      * PPOOPPCCNNTT
  438.  
  439.      * PPOOPPPPAARR
  440.  
  441.      * PPRREECCIISSIIOONN
  442.  
  443.      * PPRREESSEENNTT
  444.  
  445.      * RRAADDIIXX
  446.  
  447.      * RRAANNDDOOMM__NNUUMMBBEERR
  448.  
  449.      * RRAANNFF
  450.  
  451.      * RRAANNGGEE
  452.  
  453.      * RREEAALL
  454.  
  455.      * RRRRSSPPAACCIINNGG
  456.  
  457.      * SSCCAALLEE
  458.  
  459.      * SSEELLEECCTTEEDD__IINNTT__KKIINNDD
  460.  
  461.      * SSEETT__EEXXPPOONNEENNTT
  462.  
  463.      * SSHHIIFFTT
  464.  
  465.      * SSHHIIFFTTAA
  466.  
  467.      * SSHHIIFFTTLL
  468.  
  469.      * SSHHIIFFTTRR
  470.  
  471.      * SSIIGGNN
  472.  
  473.      * SSIINN
  474.  
  475.      * SSIINNHH
  476.  
  477.      * SSPPAACCIINNGG
  478.  
  479.      * SSPPRREEAADD
  480.  
  481.      * SSQQRRTT
  482.  
  483.      * TTAANN
  484.  
  485.      * TTAANNHH
  486.  
  487.      * TTIINNYY
  488.  
  489.      The CF90 compiler supports vector versions of some intrinsic
  490.      procedures and library-based operators on UNICOS/mk platforms, too.
  491.      Using one of these intrinsics means that the presence of the intrinsic
  492.      itself, in a loop, does not inhibit the loop's ability to vectorize.
  493.      On UNICOS/mk platforms, you must specify --OO vveeccttoorr33 and --ll mmffaassttvv on
  494.      your ff9900(1) command line in order for the compiler to be able to use
  495.      vector versions of the following intrinsic procedures:
  496.  
  497.      * CCOOSS, AACCOOSS
  498.  
  499.      * CCOOSSSS
  500.  
  501.      * EEXXPP
  502.  
  503.      * LLOOGG, LLOOGG1100
  504.  
  505.      * MM@@LLDD, MM@@MMXX, MM@@LLDDMMXX, and MM@@UULL (the BMM intrinsics)
  506.  
  507.      * PPOOPPCCNNTT
  508.  
  509.      * RRAANNFF
  510.  
  511.      * RRTTOORR
  512.  
  513.      * SSIINN, AASSIINN
  514.  
  515.      * TTAANN, AATTAANN, AATTAANN22
  516.  
  517.      * SSQQRRTT
  518.  
  519.      The MIPSpro 7 Fortran 90 and the MIPSpro Fortran 77 compilers support
  520.      both single-precision and double-precision vector versions of certain
  521.      intrinsic procedures when --OO33 is specified on the compiler command
  522.      line.  These intrinsics are as follows:
  523.  
  524.      * CCOOSS, AACCOOSS
  525.  
  526.      * EEXXPP
  527.  
  528.      * LLOOGG, LLOOGG1100
  529.  
  530.      * SSIINN, AASSIINN
  531.  
  532.      * SSQQRRTT
  533.  
  534.      * TTAANN, AATTAANN
  535.  
  536.      For details about the Fortran 95 intrinsics, see the man pages
  537.      themselves and the _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _2.
  538.  
  539.      The C/C++ intrinsics either allow direct access to hardware
  540.      instructions or result in the generation of inline code to perform
  541.      specialized functions.  The intrinsic functions are processed
  542.      completely by the compiler, and no calls to external functions are
  543.      generated.  For details about the C intrinsic procedures, see the _C_r_a_y
  544.      _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l.
  545.  
  546.      For information about the math intrinsics, see the IINNTTRROO__LLIIBBMM(3I) man
  547.      page.  When using the MIPSpro 7 Fortran 90 compiler, the math
  548.      intrinsic functions described in the _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e
  549.      _M_a_n_u_a_l, are not used.  See the SGI math library documentation for
  550.      information about math intrinsics supported on IRIX systems.
  551.  
  552. TTEERRMMIINNOOLLOOGGYY
  553.      The Fortran intrinsic procedure man pages use the terms
  554.      _s_i_n_g_l_e _p_r_e_c_i_s_i_o_n, _d_o_u_b_l_e _p_r_e_c_i_s_i_o_n, and _q_u_a_d _p_r_e_c_i_s_i_o_n.  These terms
  555.      have different meanings depending on your operating system.
  556.  
  557.      The meaning of the term _s_i_n_g_l_e _p_r_e_c_i_s_i_o_n is as follows:
  558.  
  559.      * On IRIX systems, REAL(KIND=4) and COMPLEX(KIND=4).
  560.  
  561.      * On UNICOS and UNICOS/mk systems, REAL(KIND=8) and COMPLEX(KIND=8).
  562.  
  563.      The meaning of the term _d_o_u_b_l_e _p_r_e_c_i_s_i_o_n is as follows:
  564.  
  565.      * On UNICOS/mk and IRIX systems, REAL(KIND=8) and COMPLEX(KIND=8).
  566.  
  567.      * On UNICOS systems, REAL(KIND=16) and COMPLEX(KIND=16).
  568.  
  569.      The meaning of the term _q_u_a_d _p_r_e_c_i_s_i_o_n is as follows:
  570.  
  571.      * On UNICOS and IRIX systems, REAL(KIND=16) and COMPLEX(KIND=16).
  572.  
  573.      * On UNICOS/mk systems, REAL(KIND=8) and COMPLEX(KIND=8).
  574.  
  575. SSEEEE AALLSSOO
  576.      IINNTTRROO__LLIIBBMM(3I), IINNTTRROO__SSHHMMEEMM(3)
  577.  
  578.      _F_o_r_t_r_a_n _L_a_n_g_u_a_g_e _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, _V_o_l_u_m_e _2
  579.  
  580.      _C_r_a_y _C/_C++ _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l
  581.  
  582.      _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
  583.      man page.
  584.