1!**************************************************************************************
2!
3! This file is part of FortranProject plugin for Code::Blocks IDE.
4! It contains list of keywords and intrinsic procedures which are included in code-completion list.
5!
6! Description of procedures is based on GNU Fortran user manual.
7!
8! The file is licensed under the GNU General Public License, version 3
9! http://www.gnu.org/licenses/gpl-3.0.html
10!
11! Author: Darius Markauskas
12!
13!**************************************************************************************
14
15module iso_c_binding
16    type c_ptr
17    end type
18
19    type c_funptr
20    end type
21
22    type(c_ptr), parameter :: c_null_ptr
23    type(c_funptr), parameter :: c_null_funptr
24
25    integer, parameter :: c_int
26    integer, parameter :: c_short, c_long, c_long_long, c_signed_char, c_size_t, c_int8_t, c_int16_t, c_int32_t, c_int64_t, &
27                          c_int_least8_t, c_int_least16_t, c_int_least32_t, c_int_least64_t, c_int_fast8_t, &
28                          c_int_fast16_t, c_int_fast32_t, c_int_fast64_t, c_intmax_t, c_intptr_t
29    integer, parameter :: c_float, c_double, c_long_double
30    integer, parameter :: c_float_complex, c_double_complex, c_long_double_complex
31    integer, parameter :: c_bool
32    integer, parameter :: c_char
33    character(kind=c_char, len=1), parameter :: c_null_char, c_alert, c_backspace, c_form_feed, c_new_line, &
34                                                c_carriage_return, c_horizontal_tab, c_vertical_tab
35
36    logical function c_associated(c_ptr_1 [, c_ptr_2])
37        ! Determines the status of the C pointer c_ptr_1 or if c_ptr_1 is associated with the target c_ptr_2.
38        ! Return value:
39        ! The return value is of type LOGICAL; it is .false. if either c_ptr_1 is a C NULL pointer
40        ! or if c_ptr1 and c_ptr_2 point to different addresses.
41        type(c_ptr or c_funptr) :: c_ptr_1, c_ptr_2
42    end function
43
44    subroutine c_f_pointer(cptr, fptr[, shape])
45        ! Assign the target the C pointer CPTR to the Fortran pointer FPTR and specify its shape.
46        type(c_ptr), intent(in) :: cptr
47        type(*), intent(out), pointer :: fptr
48        integer, optional, intent(in) :: shape(:)
49    end subroutine
50
51    subroutine c_f_procpointer(cptr, fptr)
52        ! Assign the target of the C function pointer CPTR to the Fortran procedure pointer FPTR.
53        type(c_funptr), intent(in) :: cptr
54        procedure(function_interface), pointer :: fptr
55    end subroutine
56
57    type(c_funptr) function c_funloc(x)
58        ! Determines the C address of the argument.
59        ! Return value:
60        ! The return value is of type C_FUNPTR and contains the C address of the argument.
61        procedure(function_interface) :: x ! Interoperable function or pointer to such function.
62    end function
63
64    type(c_ptr) function c_loc(x)
65        ! Determines the C address of the argument.
66        ! Return value:
67        ! The return value is of type C_PTR and contains the C address of the argument.
68        type(*), pointer or target :: x
69    end function
70
71    integer(c_size_t) function c_sizeof(x)
72        ! Calculates the number of bytes of storage the expression X occupies.
73        ! Return value:
74        ! The return value is of type integer and of the system-dependent kind C_SIZE_T (from the ISO_C_BINDING module).
75        ! Its value is the number of bytes occupied by the argument. If the argument has the POINTER attribute,
76        ! the number of bytes of the storage area pointed to is returned. If the argument is of a derived type
77        ! with POINTER or ALLOCATABLE components, the return value doesn't account for the sizes of the data pointed
78        ! to by these components.
79        type(*) :: x
80    end function
81
82end module iso_c_binding
83
84
85module iso_fortran_env
86    integer, parameter :: atomic_int_kind
87    integer, parameter :: atomic_logical_kind
88    integer, parameter :: character_kinds(:)
89    integer, parameter :: character_storage_size
90    integer, parameter :: error_unit
91    integer, parameter :: file_storage_size
92    integer, parameter :: input_unit
93    integer, parameter :: int8, int16, int32, int64
94    integer, parameter :: integer_kinds(:)
95    integer, parameter :: iostat_end
96    integer, parameter :: iostat_eor
97    integer, parameter :: iostat_inquire_internal_unit
98    integer, parameter :: logical_kinds(:)
99    integer, parameter :: numeric_storage_size
100    integer, parameter :: output_unit
101    integer, parameter :: real_kinds(:)
102    integer, parameter :: real32, real64, real128
103    integer, parameter :: stat_locked
104    integer, parameter :: stat_locked_other_image
105    integer, parameter :: stat_stopped_image
106    integer, parameter :: stat_unlocked
107    integer, parameter :: initial_team
108    integer, parameter :: parent_team
109    integer, parameter :: stat_failed_image
110    integer, parameter :: stat_unlocked_failed_image
111
112
113    type lock_type
114    end type
115
116    type event_type
117    end type
118
119    type team_type
120    end type
121
122    character(len=*) function compiler_options()
123        ! Processor-dependent string describing the options that controlled the program translation phase.
124    end function
125
126    character(len=*) function compiler_version()
127        ! Processor-dependent string identifying the program translation phase.
128    end function
129
130end module iso_fortran_env
131
132
133module ieee_exceptions
134    type ieee_flag_type
135    end type
136
137    type ieee_status_type
138    end type
139
140    type ieee_modes_type
141    end type
142
143    type(ieee_flag_type), parameter :: ieee_invalid
144    type(ieee_flag_type), parameter :: ieee_overflow
145    type(ieee_flag_type), parameter :: ieee_devide_by_zero
146    type(ieee_flag_type), parameter :: ieee_underflow
147    type(ieee_flag_type), parameter :: ieee_inexact
148    type(ieee_flag_type), parameter :: ieee_usual(3) = [ieee_overflow, ieee_devide_by_zero, ieee_invalid]
149    type(ieee_flag_type), parameter :: ieee_all(3) = [ieee_usual, ieee_underflow, ieee_inexact]
150
151    subroutine ieee_get_flag(flag, flag_value)
152    end subroutine
153
154    subroutine ieee_get_halting_mode(flag, halting)
155    end subroutine
156
157    subroutine ieee_get_status(status_value)
158    end subroutine
159
160    subroutine ieee_set_flag(flag, flag_value)
161    end subroutine
162
163    subroutine ieee_set_halting_mode(flag, halting)
164    end subroutine
165
166    subroutine ieee_set_status(status_value)
167    end subroutine
168
169    function ieee_support_flag(flag [, x])
170    end function
171
172    function ieee_support_halting(flag)
173    end function
174
175    subroutine ieee_get_modes(modes)
176        ! Get floating-point modes.
177        type(ieee_modes_type), intent(out) :: modes
178    end subroutine
179
180    subroutine ieee_set_modes(modes)
181        ! Set floating-point modes.
182        type(ieee_modes_type) :: modes
183    end subroutine
184
185
186end module ieee_exceptions
187
188
189module ieee_arithmetic
190    use ieee_exceptions
191
192    type ieee_class_type
193    end type
194
195    type ieee_round_type
196    end type
197
198    type(ieee_class_type), parameter :: ieee_signaling_nan
199    type(ieee_class_type), parameter :: ieee_quiet_nan
200    type(ieee_class_type), parameter :: ieee_negative_inf
201    type(ieee_class_type), parameter :: ieee_negative_normal
202    type(ieee_class_type), parameter :: ieee_negative_denormal
203    type(ieee_class_type), parameter :: ieee_negative_zero
204    type(ieee_class_type), parameter :: ieee_positive_zero
205    type(ieee_class_type), parameter :: ieee_positive_denormal
206    type(ieee_class_type), parameter :: ieee_positive_normal
207    type(ieee_class_type), parameter :: ieee_positive_inf
208    type(ieee_class_type), parameter :: ieee_other_value
209    type(ieee_class_type), parameter :: ieee_negative_subnormal
210    type(ieee_class_type), parameter :: ieee_positive_subnormal
211
212    type(ieee_round_type), parameter :: ieee_nearest
213    type(ieee_round_type), parameter :: ieee_to_zero
214    type(ieee_round_type), parameter :: ieee_up
215    type(ieee_round_type), parameter :: ieee_down
216    type(ieee_round_type), parameter :: ieee_away
217    type(ieee_round_type), parameter :: ieee_other
218
219    type(ieee_class_type) function ieee_class(x)
220        ! Classify number
221        real :: x
222    end function
223
224    function ieee_copy_sign(x, y)
225        ! Copy sign.
226    end function
227
228    subroutine ieee_get_rounding_mode(round_value[, radix])
229        ! Get rounding mode.
230        type(ieee_round_type), intent(out) :: round_value
231        integer, optional :: radix
232    end subroutine
233
234    subroutine ieee_get_underflow_mode(gradual)
235        ! Get underflow mode.
236    end subroutine
237
238    logical function ieee_is_finite(x)
239        ! Whether a value is finite.
240        real :: x
241    end function
242
243    function ieee_is_nan(x)
244        ! Whether a value is an IEEE NaN.
245    end function
246
247    function ieee_is_negative(x)
248        ! Whether a value is negative.
249    end function
250
251    function ieee_is_normal(x)
252        ! Whether a value is a normal number.
253    end function
254
255    function ieee_logb(x)
256        ! Exponent.
257    end function
258
259    function ieee_next_after(x, y)
260        ! Adjacent machine number.
261    end function
262
263    function ieee_rem(x, y)
264        ! Exact remainder.
265    end function
266
267    function ieee_rint(x)
268        ! Round to integer.
269    end function
270
271    function ieee_scalb(x, i)
272        ! x * 2**i.
273    end function
274
275    function ieee_selected_real_kind([p, r, radix])
276        ! IEEE kind type parameter value.
277        integer, optional :: p, r, radix
278    end function
279
280    subroutine ieee_set_rounding_mode(round_value)
281        ! Set rounding mode.
282    end subroutine
283
284    subroutine ieee_set_underflow_mode(gradual)
285        ! Set underflow mode.
286    end subroutine
287
288    function ieee_support_datatype([x])
289        ! Query IEEE arithmetic support.
290    end function
291
292    function ieee_support_denormal([x])
293        ! Query denormalized number support.
294    end function
295
296    function ieee_support_divide([x])
297        ! Query IEEE division support.
298    end function
299
300    function ieee_support_inf([x])
301    end function
302
303    function ieee_support_io([x])
304    end function
305
306    function ieee_support_nan([x])
307    end function
308
309    function ieee_support_rounding(round_value [, x])
310    end function
311
312    function ieee_support_sqrt([x])
313    end function
314
315    function ieee_support_standard([x])
316    end function
317
318    function ieee_support_underflow_control([x])
319    end function
320
321    function ieee_unordered(x, y)
322    end function
323
324    function ieee_value(x, class)
325    end function
326
327    function ieee_support_subnormal([x])
328        ! Query subnormalized number support.
329    end function
330
331    function ieee_real(a [, kind])
332        ! Converts to real type
333        integer or real :: a
334        integer, optional :: kind
335    end function
336
337    real function ieee_fma(a,b,c)
338        ! Performes fused multiply-add operation "(a*b)+c"
339        real :: a
340        real :: b
341        real :: c
342    end function
343
344    logical function ieee_signbit(x)
345        ! Test sign bit. Returns .true. if and only if the sign bit of X is nonzero.
346        real :: x
347    end function
348
349    integer function ieee_int(a, round [, kind])
350        ! Converts to integer type
351        real :: a
352        type(ieee_round_type) :: round
353        integer, optional :: kind
354    end function
355
356    real function ieee_max_num(x, y)
357        ! Returns maximum numerical value of two arguments:
358        ! if(x<y) returns y
359        ! if(x>y) returns x
360        real :: x
361        real :: y
362    end function
363
364    real function ieee_max_num_mag(x, y)
365        ! Returns maximum magnitude numerical value of two arguments:
366        ! if(abs(x) < abs(y)) returns y
367        ! if(abs(x) > abs(y)) returns x
368        real :: x
369        real :: y
370    end function
371
372    real function ieee_min_num(x, y)
373        ! Returns minimum numerical value of two arguments:
374        ! if(x<y) returns x
375        ! if(x>y) returns y
376        real :: x
377        real :: y
378    end function
379
380    real function ieee_min_num_mag(x, y)
381        ! Returns minimum magnitude numerical value of two arguments:
382        ! if(abs(x) < abs(y)) returns x
383        ! if(abs(x) > abs(y)) returns y
384        real :: x
385        real :: y
386    end function
387
388    real function ieee_next_down(x)
389        ! Returns adjacent lower machine number.
390        real :: x
391    end function
392
393    real function ieee_next_up(x)
394        ! Returns adjacent higher machine number.
395        real :: x
396    end function
397
398    logical function ieee_quiet_eq(a, b)
399        ! Quiet compares equal.
400        real :: a
401        real :: b
402    end function
403
404    logical function ieee_quiet_ge(a, b)
405        ! Quiet compares greater than or equal.
406        real :: a
407        real :: b
408    end function
409
410    logical function ieee_quiet_gt(a, b)
411        ! Quiet compares greater than.
412        real :: a
413        real :: b
414    end function
415
416    logical function ieee_quiet_le(a, b)
417        ! Quiet compares less than or equal.
418        real :: a
419        real :: b
420    end function
421
422    logical function ieee_quiet_lt(a, b)
423        ! Quiet compares less than.
424        real :: a
425        real :: b
426    end function
427
428    logical function ieee_quiet_ne(a, b)
429        ! Quiet compares not equal.
430        real :: a
431        real :: b
432    end function
433
434    logical function ieee_signaling_eq(a, b)
435        ! Signaling compares equal.
436        real :: a
437        real :: b
438    end function
439
440    logical function ieee_signaling_ge(a, b)
441        ! Signaling compares greater than or equal.
442        real :: a
443        real :: b
444    end function
445
446    logical function ieee_signaling_gt(a, b)
447        ! Signaling compares greater than.
448        real :: a
449        real :: b
450    end function
451
452    logical function ieee_signaling_le(a, b)
453        ! Signaling compares less than or equal.
454        real :: a
455        real :: b
456    end function
457
458    logical function ieee_signaling_lt(a, b)
459        ! Signaling compares less than.
460        real :: a
461        real :: b
462    end function
463
464    logical function ieee_signaling_ne(a, b)
465        ! Signaling compares not equal.
466        real :: a
467        real :: b
468    end function
469
470end module ieee_arithmetic
471
472module ieee_features
473    type ieee_features_type
474    end type
475
476    type(ieee_features_type), parameter :: ieee_datatype
477    type(ieee_features_type), parameter :: ieee_denormal
478    type(ieee_features_type), parameter :: ieee_divide
479    type(ieee_features_type), parameter :: ieee_halting
480    type(ieee_features_type), parameter :: ieee_inexact_flag
481    type(ieee_features_type), parameter :: ieee_inf
482    type(ieee_features_type), parameter :: ieee_invalid_flag
483    type(ieee_features_type), parameter :: ieee_nan
484    type(ieee_features_type), parameter :: ieee_rounding
485    type(ieee_features_type), parameter :: ieee_sqrt
486    type(ieee_features_type), parameter :: ieee_underflow_flag
487    type(ieee_features_type), parameter :: ieee_subnormal
488end module
489
490
491module omp_lib
492    integer, parameter :: omp_lock_kind
493    integer, parameter :: omp_nest_lock_kind
494    integer, parameter :: omp_sched_kind
495
496    integer, parameter :: openmp_version
497    integer(omp_sched_kind), parameter :: omp_sched_static
498    integer(omp_sched_kind), parameter :: omp_sched_dynamic
499    integer(omp_sched_kind), parameter :: omp_sched_guided
500    integer(omp_sched_kind), parameter :: omp_sched_auto
501
502    integer, parameter :: omp_proc_bind_kind
503    integer(omp_proc_bind_kind), parameter :: omp_proc_bind_false
504    integer(omp_proc_bind_kind), parameter :: omp_proc_bind_true
505    integer(omp_proc_bind_kind), parameter :: omp_proc_bind_master
506    integer(omp_proc_bind_kind), parameter :: omp_proc_bind_close
507    integer(omp_proc_bind_kind), parameter :: omp_proc_bind_spread
508
509    integer(omp_lock_hint_kind), parameter :: omp_lock_hint_none = 0
510    integer(omp_lock_hint_kind), parameter :: omp_lock_hint_uncontended = 1
511    integer(omp_lock_hint_kind), parameter :: omp_lock_hint_contended = 2
512    integer(omp_lock_hint_kind), parameter :: omp_lock_hint_nonspeculative = 4
513    integer(omp_lock_hint_kind), parameter :: omp_lock_hint_speculative = 8
514
515    subroutine omp_init_lock (lock)
516        integer (omp_lock_kind), intent (out) :: lock
517    end subroutine omp_init_lock
518
519    subroutine omp_init_nest_lock (lock)
520        integer (omp_nest_lock_kind), intent (out) :: lock
521    end subroutine omp_init_nest_lock
522
523    subroutine omp_destroy_lock (lock)
524        integer (omp_lock_kind), intent (inout) :: lock
525    end subroutine omp_destroy_lock
526
527    subroutine omp_destroy_nest_lock (lock)
528        integer (omp_nest_lock_kind), intent (inout) :: lock
529    end subroutine omp_destroy_nest_lock
530
531    subroutine omp_set_lock (lock)
532        integer (omp_lock_kind), intent (inout) :: lock
533    end subroutine omp_set_lock
534
535    subroutine omp_set_nest_lock (lock)
536        integer (omp_nest_lock_kind), intent (inout) :: lock
537    end subroutine omp_set_nest_lock
538
539    subroutine omp_unset_lock (lock)
540        integer (omp_lock_kind), intent (inout) :: lock
541    end subroutine omp_unset_lock
542
543    subroutine omp_unset_nest_lock (lock)
544        integer (omp_nest_lock_kind), intent (inout) :: lock
545    end subroutine omp_unset_nest_lock
546
547    subroutine omp_set_dynamic (set)
548        logical, intent (in) :: set
549    end subroutine omp_set_dynamic
550
551    subroutine omp_set_nested (set)
552        logical, intent (in) :: set
553    end subroutine omp_set_nested
554
555    subroutine omp_set_num_threads (set)
556        integer, intent (in) :: set
557    end subroutine omp_set_num_threads
558
559    function omp_get_dynamic ()
560        logical (omp_logical_kind) :: omp_get_dynamic
561    end function omp_get_dynamic
562
563    function omp_get_nested ()
564        logical (omp_logical_kind) :: omp_get_nested
565    end function omp_get_nested
566
567    function omp_in_parallel ()
568        logical (omp_logical_kind) :: omp_in_parallel
569    end function omp_in_parallel
570
571    function omp_test_lock (lock)
572        logical (omp_logical_kind) :: omp_test_lock
573        integer (omp_lock_kind), intent (inout) :: lock
574    end function omp_test_lock
575
576    function omp_get_max_threads ()
577        integer :: omp_get_max_threads
578    end function omp_get_max_threads
579
580    function omp_get_num_procs ()
581        integer :: omp_get_num_procs
582    end function omp_get_num_procs
583
584    function omp_get_num_threads ()
585        integer :: omp_get_num_threads
586    end function omp_get_num_threads
587
588    function omp_get_thread_num ()
589        integer :: omp_get_thread_num
590    end function omp_get_thread_num
591
592    function omp_test_nest_lock (lock)
593        integer :: omp_test_nest_lock
594        integer (omp_nest_lock_kind), intent (inout) :: lock
595    end function omp_test_nest_lock
596
597    function omp_get_wtick ()
598        double precision :: omp_get_wtick
599    end function omp_get_wtick
600
601    function omp_get_wtime ()
602        double precision :: omp_get_wtime
603    end function omp_get_wtime
604
605    subroutine omp_set_schedule (kind, modifier)
606        integer (omp_sched_kind), intent (in) :: kind
607        integer, intent (in) :: modifier
608    end subroutine omp_set_schedule
609
610    subroutine omp_get_schedule (kind, modifier)
611        integer (omp_sched_kind), intent (out) :: kind
612        integer, intent (out) :: modifier
613    end subroutine omp_get_schedule
614
615    function omp_get_thread_limit ()
616        integer :: omp_get_thread_limit
617    end function omp_get_thread_limit
618
619    subroutine omp_set_max_active_levels (max_levels)
620        integer, intent (in) :: max_levels
621    end subroutine omp_set_max_active_levels
622
623    function omp_get_max_active_levels ()
624        integer :: omp_get_max_active_levels
625    end function omp_get_max_active_levels
626
627    function omp_get_level ()
628        integer :: omp_get_level
629    end function omp_get_level
630
631    function omp_get_ancestor_thread_num (level)
632        integer, intent (in) :: level
633        integer :: omp_get_ancestor_thread_num
634    end function omp_get_ancestor_thread_num
635
636    function omp_get_team_size (level)
637        integer, intent (in) :: level
638        integer :: omp_get_team_size
639    end function omp_get_team_size
640
641    function omp_get_active_level ()
642        integer :: omp_get_active_level
643    end function omp_get_active_level
644
645    function omp_in_final ()
646        logical :: omp_in_final
647    end function omp_in_final
648
649    function omp_get_cancellation()
650        logical :: omp_get_cancellation
651    end function
652
653    function omp_get_proc_bind()
654        integer(omp_proc_bind_kind) :: omp_get_proc_bind
655    end function
656
657    subroutine omp_set_default_device(device_num)
658        integer :: device_num
659    end subroutine
660
661    function omp_get_default_device()
662        integer :: omp_get_default_device
663    end function
664
665    function omp_get_num_devices()
666        integer :: omp_get_num_devices
667    end function
668
669    function omp_get_num_teams()
670        integer :: omp_get_num_teams
671    end function
672
673    function omp_get_team_num()
674        integer :: omp_get_team_num
675    end function
676
677    function omp_is_initial_device()
678        integer :: omp_is_initial_device
679    end function
680
681    function omp_get_initial_device()
682        integer :: omp_get_initial_device
683    end function
684
685    subroutine omp_init_lock_with_hint (svar, hint)
686        integer (omp_lock_kind) :: svar
687        integer (omp_lock_hint_kind) :: hint
688    end subroutine omp_init_lock_with_hint
689
690    subroutine omp_init_nest_lock_with_hint (nvar, hint)
691        integer(omp_nest_lock_kind) :: nvar
692        integer(omp_lock_hint_kind) :: hint
693    end subroutine omp_init_nest_lock_with_hint
694
695end module omp_lib
696
697
698