... | @@ -4,7 +4,9 @@ An intrinsic function is implemented if it has comprehensive tests in the `integ |
... | @@ -4,7 +4,9 @@ An intrinsic function is implemented if it has comprehensive tests in the `integ |
|
|
|
|
|
The list of intrinsic functions is available in the latest Fortran standard: https://j3-fortran.org/doc/year/18/18-007r1.pdf, Table 16.1 page 332 (Chapter 16). Section 16.9 on pages 339-426 then lists details of each function.
|
|
The list of intrinsic functions is available in the latest Fortran standard: https://j3-fortran.org/doc/year/18/18-007r1.pdf, Table 16.1 page 332 (Chapter 16). Section 16.9 on pages 339-426 then lists details of each function.
|
|
|
|
|
|
Lists of functions:
|
|
---
|
|
|
|
|
|
|
|
Prev: Lists of functions:
|
|
|
|
|
|
| Function | Tested | Implemented in LLVM |
|
|
| Function | Tested | Implemented in LLVM |
|
|
| -------- | ------ | ------------------- |
|
|
| -------- | ------ | ------------------- |
|
... | @@ -17,7 +19,227 @@ Lists of functions: |
... | @@ -17,7 +19,227 @@ Lists of functions: |
|
| aimag | | |
|
|
| aimag | | |
|
|
| aint | | |
|
|
| aint | | |
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
List of Intrinsic Functions (src: Table 16.1 page 332 of [1]):
|
|
|
|
| | Intrinsic Procedure | Arguments | Class | Description | Tested | Implemented in LLVM |
|
|
|
|
|----:|:-------------------------|:------------------------------------------------------------------------------------------------------|:--------|:--------------------------------------------------------------------------------------|:---------|:----------------------|
|
|
|
|
| 1 | abs | (a) | E | Absolute value | | |
|
|
|
|
| 2 | achar | (i [, kind]) | E | Character from ascii code value | | |
|
|
|
|
| 3 | acos | (x) | E | Arccosine (inverse cosine) function | | |
|
|
|
|
| 4 | acosh | (x) | E | Inverse hyperbolic cosine function | | |
|
|
|
|
| 5 | adjustl | (string) | E | Left-justified string value | | |
|
|
|
|
| 6 | adjustr | (string) | E | Right-justified string value | | |
|
|
|
|
| 7 | aimag | (z) | E | Imaginary part of a complex number | | |
|
|
|
|
| 8 | aint | (a [, kind]) | E | Truncation toward 0 to a whole number | | |
|
|
|
|
| 9 | all | (mask) or (mask, dim) | T | Array reduced by .and. operator | | |
|
|
|
|
| 10 | allocated | (array) or (scalar) | I | Allocation status of allocatable variable | | |
|
|
|
|
| 11 | anint | (a [, kind]) | E | Nearest whole number | | |
|
|
|
|
| 12 | any | (mask) or (mask, dim) | T | Array reduced by .or. operator | | |
|
|
|
|
| 13 | asin | (x) | E | Arcsine (inverse sine) function | | |
|
|
|
|
| 14 | asinh | (x) | E | Inverse hyperbolic sine function | | |
|
|
|
|
| 15 | associated | (pointer [, target]) | I | Pointer association status inquiry | | |
|
|
|
|
| 16 | atan | (x) or (y, x) | E | Arctangent (inverse tangent) function | | |
|
|
|
|
| 17 | atan2 | (y, x) | E | Arctangent (inverse tangent) function | | |
|
|
|
|
| 18 | atanh | (x) | E | Inverse hyperbolic tangent function | | |
|
|
|
|
| 19 | atomic_add | (atom, value [, stat]) | A | Atomic addition | | |
|
|
|
|
| 20 | atomic_and | (atom, value [, stat]) | A | Atomic bitwise and | | |
|
|
|
|
| 21 | atomic_cas | (atom, old, compare, value [, stat]) | A | Atomic compare and swap | | |
|
|
|
|
| 22 | atomic_define | (atom, value [, stat]) | A | Define a variable atomically | | |
|
|
|
|
| 23 | atomic_fetch_add | (atom, value, old [, stat]) | A | Atomic fetch and add | | |
|
|
|
|
| 24 | atomic_fetch_and | (atom, value, old [, stat]) | A | Atomic fetch and bitwise and | | |
|
|
|
|
| 25 | atomic_fetch_or | (atom, value, old [, stat]) | A | Atomic fetch and bitwise or | | |
|
|
|
|
| 26 | atomic_fetch_xor | (atom, value, old [, stat]) | A | Atomic fetch and bitwise exclusive or | | |
|
|
|
|
| 27 | atomic_or | (atom, value [, stat]) | A | Atomic bitwise or | | |
|
|
|
|
| 28 | atomic_ref | (value, atom [, stat]) | A | Reference a variable atomically | | |
|
|
|
|
| 29 | atomic_xor | (atom, value [, stat]) | A | Atomic bitwise exclusive or | | |
|
|
|
|
| 30 | bessel_j0 | (x) | E | Bessel function of the 1 st kind, order 0 | | |
|
|
|
|
| 31 | bessel_j1 | (x) | E | Bessel function of the 1 st kind, order 1 | | |
|
|
|
|
| 32 | bessel_jn | (n, x) | E | Bessel function of the 1 st kind, order n | | |
|
|
|
|
| 33 | bessel_jn | (n1, n2, x) | T | Bessel functions of the 1 st kind | | |
|
|
|
|
| 34 | bessel_y0 | (x) | E | Bessel function of the 2 nd kind, order 0 | | |
|
|
|
|
| 35 | bessel_y1 | (x) | E | Bessel function of the 2 nd kind, order 1 | | |
|
|
|
|
| 36 | bessel_yn | (n, x) | E | Bessel function of the 2 nd kind, order n | | |
|
|
|
|
| 37 | bessel_yn | (n1, n2, x) | T | Bessel functions of the 2 nd kind | | |
|
|
|
|
| 38 | bge | (i, j) | E | Bitwise greater than or equal to | | |
|
|
|
|
| 39 | bgt | (i, j) | E | Bitwise greater than | | |
|
|
|
|
| 40 | bit_size | (i) | I | Number of bits in integer model 16.3 | | |
|
|
|
|
| 41 | ble | (i, j) | E | Bitwise less than or equal to | | |
|
|
|
|
| 42 | blt | (i, j) | E | Bitwise less than | | |
|
|
|
|
| 43 | btest | (i, pos) | E | Test single bit in an integer | | |
|
|
|
|
| 44 | ceiling | (a [, kind]) | E | Least integer greater than or equal to a | | |
|
|
|
|
| 45 | char | (i [, kind]) | E | Character from code value | | |
|
|
|
|
| 46 | cmplx | (x [, kind]) or (x [, y, kind]) | E | Conversion to complex type | | |
|
|
|
|
| 47 | co_broadcast | (a, source_image [, stat, errmsg]) | C | Broadcast value to images | | |
|
|
|
|
| 48 | co_max | (a [, result_image, stat, errmsg]) | C | Compute maximum value across images | | |
|
|
|
|
| 49 | co_min | (a [, result_image, stat, errmsg]) | C | Compute minimum value across images | | |
|
|
|
|
| 50 | co_reduce | (a, operation [, result_image, stat, errmsg]) | C | Generalized reduction across images | | |
|
|
|
|
| 51 | co_sum | (a [, result_image, stat, errmsg]) | C | Compute sum across images | | |
|
|
|
|
| 52 | command_argument_count | ( ) | T | Number of command arguments | | |
|
|
|
|
| 53 | conjg | (z) | E | Conjugate of a complex number | | |
|
|
|
|
| 54 | cos | (x) | E | Cosine function | | |
|
|
|
|
| 55 | cosh | (x) | E | Hyperbolic cosine function | | |
|
|
|
|
| 56 | coshape | (coarray [, kind]) | I | Sizes of codimensions of a coarray | | |
|
|
|
|
| 57 | count | (mask [, dim, kind]) | T | Logical array reduced by counting true values | | |
|
|
|
|
| 58 | cpu_time | (time) | S | Processor time used | | |
|
|
|
|
| 59 | cshift | (array, shift [, dim]) | T | Circular shift of an array | | |
|
|
|
|
| 60 | date_and_time | ([date, time, zone, values]) | S | Date and time | | |
|
|
|
|
| 61 | dble | (a) | E | Conversion to double precision real | | |
|
|
|
|
| 62 | digits | (x) | I | Significant digits in numeric model | | |
|
|
|
|
| 63 | dim | (x, y) | E | Maximum of x − y and zero | | |
|
|
|
|
| 64 | dot_product | (vector_a, vector_b) | T | Dot product of two vectors | | |
|
|
|
|
| 65 | dprod | (x, y) | E | Double precision real product | | |
|
|
|
|
| 66 | dshiftl | (i, j, shift) | E | Combined left shift | | |
|
|
|
|
| 67 | dshiftr | (i, j, shift) | E | Combined right shift | | |
|
|
|
|
| 68 | eoshift | (array, shift [, boundary, dim]) | T | End-off shift of the elements of an array | | |
|
|
|
|
| 69 | epsilon | (x) | I | Model number that is small compared to 1 | | |
|
|
|
|
| 70 | erf | (x) | E | Error function | | |
|
|
|
|
| 71 | erfc | (x) | E | Complementary error function | | |
|
|
|
|
| 72 | erfc_scaled | (x) | E | Scaled complementary error function | | |
|
|
|
|
| 73 | event_query | (event, count [, stat]) | S | Query event count | | |
|
|
|
|
| 74 | execute_command_line | (command [, wait, exitstat, cmdstat, cmdmsg]) | S | Execute a command line | | |
|
|
|
|
| 75 | exp | (x) | E | Exponential function | | |
|
|
|
|
| 76 | exponent | (x) | E | Exponent of floating-point number | | |
|
|
|
|
| 77 | extends_type_of | (a, mold) | I | Dynamic type extension inquiry | | |
|
|
|
|
| 78 | failed_images | ([team, kind]) | T | Indices of failed images | | |
|
|
|
|
| 79 | findloc | (array, value, dim [, mask, kind, back]) or (array, value [, mask, kind, back]) | T | Location(s) of a specified value | | |
|
|
|
|
| 80 | floor | (a [, kind]) | E | Greatest integer less than or equal to a | | |
|
|
|
|
| 81 | fraction | (x) | E | Fractional part of number | | |
|
|
|
|
| 82 | gamma | (x) | E | Gamma function | | |
|
|
|
|
| 83 | get_command | ([command, length, status, errmsg]) | S | Get program invocation command | | |
|
|
|
|
| 84 | get_command_argument | (number [, value, length, status, errmsg]) | S | Get program invocation argument | | |
|
|
|
|
| 85 | get_environment_variable | (name [, value, length, status, trim_name, errmsg]) | S | Get environment variable | | |
|
|
|
|
| 86 | get_team | ([level]) | T | Team | | |
|
|
|
|
| 87 | huge | (x) | I | Largest model number | | |
|
|
|
|
| 88 | hypot | (x, y) | E | Euclidean distance function | | |
|
|
|
|
| 89 | iachar | (c [, kind]) | E | Ascii code value for character | | |
|
|
|
|
| 90 | iall | (array, dim [, mask]) or (array [, mask]) | T | Array reduced by iand function | | |
|
|
|
|
| 91 | iand | (i, j) | E | Bitwise and | | |
|
|
|
|
| 92 | iany | (array, dim [, mask]) or (array [, mask]) | T | Array reduced by ior function | | |
|
|
|
|
| 93 | ibclr | (i, pos) | E | I with bit pos replaced by zero | | |
|
|
|
|
| 94 | ibits | (i, pos, len) | E | Specified sequence of bits | | |
|
|
|
|
| 95 | ibset | (i, pos) | E | I with bit pos replaced by one | | |
|
|
|
|
| 96 | ichar | (c [, kind]) | E | Code value for character | | |
|
|
|
|
| 97 | ieor | (i, j) | E | Bitwise exclusive or | | |
|
|
|
|
| 98 | image_index | (coarray, sub) or (coarray, sub, team) or (coarray, sub, team_number) | T | Image index from cosubscripts | | |
|
|
|
|
| 99 | image_status | (image [, team]) | E | Image execution state | | |
|
|
|
|
| 100 | index | (string, substring [, back, kind]) | E | Character string search | | |
|
|
|
|
| 101 | int | (a [, kind]) | E | Conversion to integer type | | |
|
|
|
|
| 102 | ior | (i, j) | E | Bitwise inclusive or | | |
|
|
|
|
| 103 | iparity | (array, dim [, mask]) or (array [, mask]) | T | Array reduced by ieor function | | |
|
|
|
|
| 104 | ishft | (i, shift) | E | Logical shift | | |
|
|
|
|
| 105 | ishftc | (i, shift [, size]) | E | Circular shift of the rightmost bits | | |
|
|
|
|
| 106 | is_contiguous | (array) | I | Array contiguity test (8.5.7) | | |
|
|
|
|
| 107 | is_iostat_end | (i) | E | Iostat value test for end of file | | |
|
|
|
|
| 108 | is_iostat_eor | (i) | E | Iostat value test for end of record | | |
|
|
|
|
| 109 | kind | (x) | I | Value of the kind type parameter of x | | |
|
|
|
|
| 110 | lbound | (array [, dim, kind]) | I | Lower bound(s) | | |
|
|
|
|
| 111 | lcobound | (coarray [, dim, kind]) | I | Lower cobound(s) of a coarray | | |
|
|
|
|
| 112 | leadz | (i) | E | Number of leading zero bits | | |
|
|
|
|
| 113 | len | (string [, kind]) | I | Length of a character entity | | |
|
|
|
|
| 114 | len_trim | (string [, kind]) | E | Length without trailing blanks | | |
|
|
|
|
| 115 | lge | (string_a, string_b) | E | Ascii greater than or equal | | |
|
|
|
|
| 116 | lgt | (string_a, string_b) | E | Ascii greater than | | |
|
|
|
|
| 117 | lle | (string_a, string_b) | E | Ascii less than or equal | | |
|
|
|
|
| 118 | llt | (string_a, string_b) | E | Ascii less than | | |
|
|
|
|
| 119 | log | (x) | E | Natural logarithm | | |
|
|
|
|
| 120 | log_gamma | (x) | E | Logarithm of the absolute value of the gamma function | | |
|
|
|
|
| 121 | log10 | (x) | E | Common logarithm | | |
|
|
|
|
| 122 | logical | (l [, kind]) | E | Conversion between kinds of logical | | |
|
|
|
|
| 123 | maskl | (i [, kind]) | E | Left justified mask | | |
|
|
|
|
| 124 | maskr | (i [, kind]) | E | Right justified mask | | |
|
|
|
|
| 125 | matmul | (matrix_a, matrix_b) | T | Matrix multiplication | | |
|
|
|
|
| 126 | max | (a1, a2 [, a3, ...]) | E | Maximum value | | |
|
|
|
|
| 127 | maxexponent | (x) | I | Maximum exponent of a real model | | |
|
|
|
|
| 128 | maxloc | (array, dim [, mask, kind, back]) or (array [, mask, kind, back]) | T | Location(s) of maximum value | | |
|
|
|
|
| 129 | maxval | (array, dim [, mask]) or (array [, mask]) | T | Maximum value(s) of array | | |
|
|
|
|
| 130 | merge | (tsource, fsource, mask) | E | Expression value selection | | |
|
|
|
|
| 131 | merge_bits | (i, j, mask) | E | Merge of bits under mask | | |
|
|
|
|
| 132 | min | (a1, a2 [, a3, ...]) | E | Minimum value | | |
|
|
|
|
| 133 | minexponent | (x) | I | Minimum exponent of a real model | | |
|
|
|
|
| 134 | minloc | (array, dim [, mask, kind, back]) or (array [, mask, kind, back]) | T | Location(s) of minimum value | | |
|
|
|
|
| 135 | minval | (array, dim [, mask]) or (array [, mask]) | T | Minimum value(s) of array | | |
|
|
|
|
| 136 | mod | (a, p) | E | Remainder function | | |
|
|
|
|
| 137 | modulo | (a, p) | E | Modulo function | | |
|
|
|
|
| 138 | move_alloc | (from, to [, stat, errmsg]) | PS | Move an allocation | | |
|
|
|
|
| 139 | mvbits | (from, frompos, len, to, topos) | ES | Copy a sequence of bits | | |
|
|
|
|
| 140 | nearest | (x, s) | E | Adjacent machine number | | |
|
|
|
|
| 141 | new_line | (a) | I | Newline character | | |
|
|
|
|
| 142 | nint | (a [, kind]) | E | Nearest integer | | |
|
|
|
|
| 143 | norm2 | (x) or (x, dim) | T | L2 norm of an array | | |
|
|
|
|
| 144 | not | (i) | E | Bitwise complement | | |
|
|
|
|
| 145 | nan | ([mold]) | T | Disassociated pointer or unallocated allocatable entity | | |
|
|
|
|
| 146 | num_images | ( ) or (team) or (team_- number) | T | Number of images | | |
|
|
|
|
| 147 | out_of_range | (x, mold [, round]) | E | Whether a value cannot be converted safely | | |
|
|
|
|
| 148 | pack | (array, mask [, vector]) | T | Array packed into a vector | | |
|
|
|
|
| 149 | parity | (mask) or (mask, dim) | T | Array reduced by .neqv. operator | | |
|
|
|
|
| 150 | popcnt | (i) | E | Number of one bits | | |
|
|
|
|
| 151 | poppar | (i) | E | Parity expressed as 0 or 1 | | |
|
|
|
|
| 152 | precision | (x) | I | Decimal precision of a real model | | |
|
|
|
|
| 153 | present | (a) | I | Presence of optional argument | | |
|
|
|
|
| 154 | product | (array, dim [, mask]) or (array [, mask]) | T | Array reduced by multiplication | | |
|
|
|
|
| 155 | radix | (x) | I | Base of a numeric model | | |
|
|
|
|
| 156 | random_init | (repeatable, image_- distinct) | S | Pseudorandom number generator initialization | | |
|
|
|
|
| 157 | random_number | (harvest) | S | Generate pseudorandom number(s) | | |
|
|
|
|
| 158 | random_seed | ([size, put, get]) | S | Pseudorandom number generator control | | |
|
|
|
|
| 159 | range | (x) | I | Decimal exponent range of a numeric model (16.4) | | |
|
|
|
|
| 160 | rank | (a) | I | Rank of a data object | | |
|
|
|
|
| 161 | real | (a [, kind]) | E | Conversion to real type | | |
|
|
|
|
| 162 | reduce | (array, operation, dim [, mask, identity, ordered]) or (array, operation [, mask, identity, ordered]) | T | General reduction of array repeat (string, ncopies) t repetitive string concatenation | | |
|
|
|
|
| 163 | reshape | (source, shape [, pad, order]) | T | Arbitrary shape array construction | | |
|
|
|
|
| 164 | rrspacing | (x) | E | Reciprocal of relative spacing of model numbers | | |
|
|
|
|
| 165 | same_type_as | (a, b) | I | Dynamic type equality test | | |
|
|
|
|
| 166 | scale | (x, i) | E | Real number scaled by radix power | | |
|
|
|
|
| 167 | scan | (string, set [, back, kind]) | E | Character set membership search | | |
|
|
|
|
| 168 | selected_char_kind | (name) | T | Character kind selection | | |
|
|
|
|
| 169 | selected_int_kind | (r) | T | Integer kind selection | | |
|
|
|
|
| 170 | selected_real_kind | ([p, r, radix]) | T | Real kind selection | | |
|
|
|
|
| 171 | set_exponent | (x, i) | E | Real value with specified exponent | | |
|
|
|
|
| 172 | shape | (source [, kind]) | I | Shape of an array or a scalar | | |
|
|
|
|
| 173 | shifta | (i, shift) | E | Right shift with fill | | |
|
|
|
|
| 174 | shiftl | (i, shift) | E | Left shift | | |
|
|
|
|
| 175 | shiftr | (i, shift) | E | Right shift | | |
|
|
|
|
| 176 | sign | (a, b) | E | Magnitude of a with the sign of b | | |
|
|
|
|
| 177 | sin | (x) | E | Sine function | | |
|
|
|
|
| 178 | sinh | (x) | E | Hyperbolic sine function | | |
|
|
|
|
| 179 | size | (array [, dim, kind]) | I | Size of an array or one extent | | |
|
|
|
|
| 180 | spacing | (x) | E | Spacing of model numbers | | |
|
|
|
|
| 181 | spread | (source, dim, ncopies) | T | Value replicated in a new dimension | | |
|
|
|
|
| 182 | sqrt | (x) | E | Square root | | |
|
|
|
|
| 183 | stopped_images | ([team, kind]) | T | Indices of stopped images | | |
|
|
|
|
| 184 | storage_size | (a [, kind]) | I | Storage size in bits | | |
|
|
|
|
| 185 | sum | (array, dim [, mask]) or (array [, mask]) | T | Array reduced by addition | | |
|
|
|
|
| 186 | system_clock | ([count, count_rate, count_max]) | S | Query system clock | | |
|
|
|
|
| 187 | tan | (x) | E | Tangent function | | |
|
|
|
|
| 188 | tanh | (x) | E | Hyperbolic tangent function | | |
|
|
|
|
| 189 | team_number | ([team]) | T | Team number | | |
|
|
|
|
| 190 | this_image | ([team]) | T | Index of the invoking image | | |
|
|
|
|
| 191 | this_image | (coarray [, team]) or (coarray, dim [, team]) | T | Cosubscript(s) for this image | | |
|
|
|
|
| 192 | tiny | (x) | I | Smallest positive model number | | |
|
|
|
|
| 193 | trailz | (i) | E | Number of trailing zero bits | | |
|
|
|
|
| 194 | transfer | (source, mold [, size]) | T | Transfer physical representation | | |
|
|
|
|
| 195 | transpose | (matrix) | T | Transpose of an array of rank two | | |
|
|
|
|
| 196 | trim | (string) | T | String without trailing blanks | | |
|
|
|
|
| 197 | ubound | (array [, dim, kind]) | I | Upper bound(s) | | |
|
|
|
|
| 198 | ucobound | (coarray [, dim, kind]) | I | Upper cobound(s) of a coarray | | |
|
|
|
|
| 199 | unpack | (vector, mask, field) | T | Vector unpacked into an array | | |
|
|
|
|
| 200 | verify | (string, set [, back, kind]) | E | Character set non-membership search. | | |
|
|
|
|
|
|
|
|
In the Class column of the above Table
|
|
|
|
- A indicates that the procedure is an atomic subroutine,
|
|
|
|
- C indicates that the procedure is a collective subroutine,
|
|
|
|
- E indicates that the procedure is an elemental function,
|
|
|
|
- ES indicates that the procedure is an elemental subroutine,
|
|
|
|
- I indicates that the procedure is an inquiry function,
|
|
|
|
- PS indicates that the procedure is a pure subroutine when the FROM argument is not a coarray,
|
|
|
|
- S indicates that the procedure is an impure subroutine, and
|
|
|
|
- T indicates that the procedure in a transformational function.
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
...
|
|
Reference:
|
|
|
|
1. [F2018 Interpretation
|
|
|
|
Document](https://j3-fortran.org/doc/year/18/18-007r1.pdf)
|
|
|
|
---
|
|
|
|
|
|
TODO: Finish this list (#665) |
|
TODO: Finish this list (#665) |
|
|
|
\ No newline at end of file |