Procedures

ProcedureLocationProcedure TypeDescription
a_star pic_graph Subroutine

A* search for one shortest path from source to target.

Read more…
add_flops pic_flop_recorder Subroutine

Add an int64 variable which contains the FLOPs we use int64 since we might reach very large FLOP counts

Read more…
adjustl pic_string_type Interface

Left-adjust the character sequence represented by the string. The length of the character sequence remains unchanged.

Read more…
adjustl_string pic_string_type Function

Left-adjust the character sequence represented by the string. The length of the character sequence remains unchanged.

adjustr pic_string_type Interface

Right-adjust the character sequence represented by the string. The length of the character sequence remains unchanged.

Read more…
adjustr_string pic_string_type Function

Right-adjust the character sequence represented by the string. The length of the character sequence remains unchanged.

ansi_alt_screen_enter pic_ansi Function

Switch to the alternate screen buffer.

Read more…
ansi_alt_screen_leave pic_ansi Function

Switch back to the normal screen buffer.

ansi_bg pic_ansi Function

Set the background to one of the sixteen named colours.

ansi_bg_256 pic_ansi Function

Set the background from the 256-colour cube.

ansi_bg_rgb pic_ansi Function

Set the background to a 24-bit colour.

ansi_bold pic_ansi Function

Turn on bold.

ansi_clear_line pic_ansi Function

Clear the line the cursor is on.

ansi_clear_screen pic_ansi Function

Clear the whole screen and home the cursor.

ansi_fg pic_ansi Function

Set the foreground to one of the sixteen named colours.

ansi_fg_256 pic_ansi Function

Set the foreground from the 256-colour cube.

ansi_fg_rgb pic_ansi Function

Set the foreground to a 24-bit colour.

ansi_hide_cursor pic_ansi Function

Hide the cursor.

ansi_move_to pic_ansi Function

Move the cursor to a one-based row and column.

Read more…
ansi_reset pic_ansi Function

Reset every attribute.

ansi_reverse pic_ansi Function

Swap foreground and background.

ansi_show_cursor pic_ansi Function

Show the cursor.

any_of_kind pic_cli Function

Whether any declared entry has this kind.

array_hash pic_array_hash Interface

One-shot digest of a single array or string.

Read more…
array_hash64 pic_array_hash Interface

One-shot digest of a single array or string.

Read more…
array_hash64_bytes_hashed pic_array_hash Function

Number of encoded bytes consumed so far.

Read more…
array_hash64_digest pic_array_hash Function

The digest of everything fed in so far.

Read more…
array_hash64_hex pic_array_hash Function

Format a digest as 16 lowercase hexadecimal characters.

Read more…
array_hash64_reset pic_array_hash Subroutine

Return the accumulator to its initial state.

Read more…
array_hash_bytes_hashed pic_array_hash Function

Number of encoded bytes consumed so far.

Read more…
array_hash_digest pic_array_hash Function

The digest of everything fed in so far.

Read more…
array_hash_hex pic_array_hash Function

Format a digest as 8 lowercase hexadecimal characters.

Read more…
array_hash_reset pic_array_hash Subroutine

Return the accumulator to its initial state.

Read more…
assemble_fixed pic_format Function

Place the decimal point in an already rounded digit string.

Read more…
assign_string_char pic_string_type Subroutine

Assign a character sequence to a string.

assignment(=) pic_string_type Interface

Assign a character sequence to a string.

base_code pic_ansi Function

SGR number for a named colour: base + n, or base + 60 + n bright.

bd_mul_pow pic_format Subroutine

Multiply the big integer in place by base**power.

Read more…
bd_mul_small pic_format Subroutine

Multiply the big integer in place by a factor smaller than LIMB_BASE.

Read more…
bd_set pic_format Subroutine

Initialise the big integer from a strictly positive int64.

bd_to_digits pic_format Subroutine

Write the big integer out as a decimal digit string, no leading zeros.

bfs pic_graph Subroutine

Breadth-first search, ignoring edge weights.

Read more…
bits_to_real_dp pic_serialize Function

Reinterpret the bit pattern of an int64 as a real(dp). See bits_to_real_sp for why this is confined to the swapped path.

bits_to_real_sp pic_serialize Function

Reinterpret the bit pattern of an int32 as a real(sp).

Read more…
bswap_int32 pic_serialize Function

Reverse the four bytes of an int32.

Read more…
bswap_int64 pic_serialize Function

Reverse the eight bytes of an int64.

buffer_message pic_pure_logger Subroutine

Core buffering routine — appends a log entry to the buffer. If the buffer is full, increments the overflow counter. If a message or name exceeds its max length, it is truncated and the entry is flagged.

char pic_string_type Interface

Return the character sequence represented by the string.

Read more…
char_decrease_ord_sort pic_sorting_ord_sort Subroutine
char_decrease_sort pic_sorting_sort Subroutine
char_increase_ord_sort pic_sorting_ord_sort Subroutine
char_increase_sort pic_sorting_sort Subroutine
char_string pic_string_type Function

Return the character sequence represented by the string.

char_string_pos pic_string_type Function

Return the character sequence represented by the string.

char_string_range pic_string_type Function

Return the character sequence represented by the string.

char_to_lower pic_ascii Function

Returns the corresponding lowercase letter, if c is an uppercase ASCII character, otherwise c itself.

char_to_upper pic_ascii Function

Returns the corresponding uppercase letter, if c is a lowercase ASCII character, otherwise c itself.

character_fnv_1 pic_hash_32bit_fnv Function
character_fnv_1a pic_hash_32bit_fnv Function
check_exponent pic_tokenizer Subroutine

Validate the exponent part of a real, starting at pos.

check_graph pic_graph Function

Validate the structural preconditions shared by every algorithm here.

Read more…
check_io pic_serialize Subroutine

Turn a non zero iostat into an ERROR_IO carrying the raw value. Every I/O statement in this module funnels its status through here so that the failure message always names both the operation and the iostat the runtime produced.

check_weights pic_graph Function

Reject negative edge weights, on which Dijkstra and A* are invalid.

chomp pic_strings Interface

Remove trailing characters in set from string. If no character set is provided trailing whitespace is removed.

Read more…
chomp_char pic_strings Function

Remove trailing characters in set from string. Default character set variant where trailing whitespace is removed.

chomp_set_char_char pic_strings Function

Remove trailing characters in set from string.

chomp_set_string_char pic_strings Function

Remove trailing characters in set from string.

chomp_string pic_strings Function

Remove trailing characters in set from string. Default character set variant where trailing whitespace is removed.

chomp_substring_char_char pic_strings Function

Remove trailing substrings from string.

chomp_substring_char_string pic_strings Function

Remove trailing substrings from string.

chomp_substring_string_char pic_strings Function

Remove trailing substrings from string.

chomp_substring_string_string pic_strings Function

Remove trailing substrings from string.

civil_from_days pic_clock Subroutine

Inverse of days_from_civil.

clamp pic_math Interface

Constrain a value to the inclusive range [lo, hi].

Read more…
clamp_byte pic_ansi Function

Clamp to 0 to 255, so a caller’s arithmetic slip cannot emit a sequence the terminal will misparse.

clamp_dp pic_math Function

Clamp a real(dp) value to [lo, hi].

clamp_int32 pic_math Function

Clamp an integer(int32) value to [lo, hi].

clamp_int64 pic_math Function

Clamp an integer(int64) value to [lo, hi].

clamp_sp pic_math Function

Clamp a real(sp) value to [lo, hi].

clear_log_buffer pic_pure_logger Subroutine

Reset the buffer to empty. Call after flushing if you want to reuse it.

cli_add_flag pic_cli Subroutine

Declare a flag, which takes no value.

Read more…
cli_add_option pic_cli Subroutine

Declare an option that takes a value.

cli_add_positional pic_cli Subroutine

Declare a positional argument, filled in registration order.

cli_find pic_cli Function

Index of the entry with this long name, or 0.

Read more…
cli_find_short pic_cli Function

Index of the entry with this short name, or 0. Empty never matches.

cli_get_char pic_cli Subroutine

Read a value into a deferred-length character.

cli_get_int32 pic_cli Subroutine

Read a value as integer(int32), strictly.

Read more…
cli_get_int64 pic_cli Subroutine

Read a value as integer(int64), strictly.

cli_get_logical pic_cli Subroutine

Read a value as logical.

Read more…
cli_get_real_dp pic_cli Subroutine

Read a value as real(dp), strictly.

cli_get_real_sp pic_cli Subroutine

Read a value as real(sp), strictly.

cli_get_string pic_cli Subroutine

Read a value as a string_type.

cli_has pic_cli Function

Whether name was declared at all.

cli_help_requested pic_cli Function

Whether -h or --help was given.

Read more…
cli_help_text pic_cli Function

The help text, as a string. Nothing is printed; see the module note.

Read more…
cli_is_set pic_cli Function

Whether name appeared on the command line.

Read more…
cli_occurrences pic_cli Function

How many times name appeared on the command line.

Read more…
cli_parse pic_cli Subroutine

Parse the real command line.

Read more…
cli_parse_args pic_cli Subroutine

Parse an explicit argument list.

Read more…
cli_reserve pic_cli Subroutine

Make room for one more entry, doubling the store when it is full.

cli_set_program pic_cli Subroutine

Name and one-line description, used by help_text.

clip_head pic_error Function

Fit a location into MAX_LOCATION_LEN keeping its TAIL, marking any truncation with a leading TRUNCATION_MARKER.

clip_tail pic_error Function

Fit a cause message into MAX_CAUSE_MSG_LEN keeping its HEAD, marking any truncation with a trailing TRUNCATION_MARKER.

close_log_file pic_logger Subroutine

Close the log file, needs to be called at the end of the program

Read more…
code_to_string pic_error Function

Map an error code to a human-readable name

Read more…
compute_lps pic_strings Function

Computes longest prefix suffix for each index of the input ‘string’

Read more…
concat_char_string pic_string_type Function

Concatenate two character sequences. In this version the right-hand side character sequences is by a string.

concat_string_char pic_string_type Function

Concatenate two character sequences. In this version the left-hand side character sequences is by a string.

concat_string_string pic_string_type Function

Concatenate two character sequences. In this version both character sequences are by a string.

configuration pic_logger Subroutine

Get the current logger verbosity configuration

Read more…
configure pic_logger Subroutine

Configure the logger to be a certain verbosity level

Read more…
configure_file_output pic_logger Subroutine

Configure the logger to file to be a certain verbosity level

Read more…
connected_components pic_graph Subroutine

Label the weakly connected components of the graph.

Read more…
copy_3d_tensor_dp pic_array Subroutine

copy a tensor of datatype dp

copy_3d_tensor_int32 pic_array Subroutine

copy a tensor of datatype int32

copy_3d_tensor_int64 pic_array Subroutine

copy a tensor of datatype int64

copy_3d_tensor_sp pic_array Subroutine

copy a tensor of datatype sp

copy_matrix_dp pic_array Subroutine

copy a matrix of datatype dp

copy_matrix_int32 pic_array Subroutine

copy a matrix of datatype int32

copy_matrix_int64 pic_array Subroutine

copy a matrix of datatype int64

copy_matrix_sp pic_array Subroutine

copy a matrix of datatype sp

copy_vector_dp pic_array Subroutine

copy a vector of datatype dp

copy_vector_int32 pic_array Subroutine

copy a vector of datatype int32

copy_vector_int64 pic_array Subroutine

copy a vector of datatype int64

copy_vector_sp pic_array Subroutine

copy a vector of datatype sp

count pic_strings Interface

Returns the number of times substring ‘pattern’ has appeared in the input string ‘string’

count_char_char pic_strings Function

Returns the number of times substring ‘pattern’ has appeared in the input string ‘string’ Returns an integer

count_char_string pic_strings Function

Returns the number of times substring ‘pattern’ has appeared in the input string ‘string’ Returns an integer

count_string_char pic_strings Function

Returns the number of times substring ‘pattern’ has appeared in the input string ‘string’ Returns an integer

count_string_string pic_strings Function

Returns the number of times substring ‘pattern’ has appeared in the input string ‘string’ Returns an integer

csr_build_from_coo pic_csr Subroutine

Build the matrix from coordinate (COO) triplets.

Read more…
csr_destroy pic_csr Subroutine

Release all storage and reset the matrix to an empty 0 by 0 one.

csr_is_valid pic_csr Function

Check that the stored triple is structurally consistent.

Read more…
csr_matvec pic_csr Subroutine

Sparse matrix-vector product y = A*x.

Read more…
csr_n_cols pic_csr Function

Number of columns of the matrix.

csr_n_rows pic_csr Function

Number of rows of the matrix.

csr_nnz pic_csr Function

Number of stored entries, including any explicitly stored zeros.

csr_row_slice pic_csr Subroutine

Copy out the column indices and values stored in row i.

Read more…
csr_transpose pic_csr Subroutine

Build the transpose of this matrix into at.

Read more…
datetime_from_unix_ms pic_clock Function

Inverse of unix_time_ms, producing a UTC datetime_t.

days_from_civil pic_clock Function

Days from 1970-01-01 to the given proleptic Gregorian date.

Read more…
debug pic_logger Subroutine

Log a message that will only be printed at the debug level of verbosity

Read more…
decode_keys pic_ansi Subroutine

Decode raw terminal bytes into key events.

Read more…
decode_single pic_ansi Subroutine

Decode one byte that is not part of an escape sequence.

dijkstra pic_graph Subroutine

Single-source shortest paths with non-negative edge weights.

Read more…
dispatch pic_pure_logger Subroutine

Route a buffered entry to the appropriate logger method

display_width pic_ansi Function

Number of columns text occupies.

Read more…
distance_key pic_graph Function

Map a non-negative real(dp) onto an integer(int64) heap key, preserving order exactly.

Read more…
dp_decrease_ord_sort pic_sorting_ord_sort Subroutine
dp_decrease_sort pic_sorting_sort Subroutine
dp_increase_ord_sort pic_sorting_ord_sort Subroutine
dp_increase_sort pic_sorting_sort Subroutine
dummy_work pic_test_helpers Subroutine

this subroutine runs a random dgemm to create work so that timers and other testing utils work nicely

Read more…
element_bytes pic_serialize Function

Bytes occupied by one element of the record type tag, or -1 for an unknown tag.

emit pic_ansi Subroutine

Append an event, silently dropping any beyond the caller’s array.

ends_with pic_strings Interface

Check whether a string ends with substring or not

Read more…
ends_with_char_char pic_strings Function

Check whether a string ends with substring or not

ends_with_char_string pic_strings Function

Check whether a string ends with substring or not

ends_with_string_char pic_strings Function

Check whether a string ends with substring or not

ends_with_string_string pic_strings Function

Check whether a string ends with substring or not

enqueue_neighbours pic_graph Subroutine

Label and enqueue every still-unlabelled neighbour of u.

entry_key pic_hash_map Function

Rebuild the key of an entry from the packed character pool.

entry_label pic_cli Function

The left-hand column of one help line.

eq_char_string pic_string_type Function

Compare two character sequences for equality. In this version the right-hand side character sequences is by a string.

eq_string_char pic_string_type Function

Compare two character sequences for equality. In this version the left-hand side character sequences is by a string.

eq_string_string pic_string_type Function

Compare two character sequences for equality. In this version both character sequences are by a string.

error pic_logger Subroutine

Log a message that will only be printed at the error of verbosity

Read more…
error_add_context pic_error Subroutine

Add a call location to the stack trace Typically called when propagating errors upward

Read more…
error_clear pic_error Subroutine

Clear the error state, stack trace, and cause chain

error_fatal pic_error Subroutine

Print the error trace and stop the program Use for unrecoverable errors

Read more…
error_get_code pic_error Function

Get the error code

error_get_full_trace pic_error Function

Get complete error message with cause chain and stack trace Returns a dynamically-sized multi-line string

error_get_message pic_error Function

Get the error message (without stack trace)

error_has_error pic_error Function

Check if an error is set

error_is pic_error Function

Check if the error matches a specific error code

Read more…
error_print_trace pic_error Subroutine

Print error with cause chain and stack trace to specified unit If unit not specified, prints to stdout

error_raise pic_error Subroutine

Set an optional error argument, if the caller supplied one.

Read more…
error_set pic_error Subroutine

Set an error with code and message Resets the stack trace and cause chain

error_wrap pic_error Subroutine

Wrap the current error with a higher-level context Pushes the current error into the cause chain and sets a new top-level code and message (Rust-style “caused by”)

Read more…
escape_length pic_ansi Function

Length of the escape sequence beginning at start, or 0.

Read more…
expand_exact pic_format Subroutine

Exact decimal expansion of a finite, strictly positive value.

Read more…
exponent_field pic_format Function

Canonical exponent field: sign, then at least two zero padded digits.

fail pic_graph Subroutine

Set err to ERROR_VALIDATION with message, when err is present.

fail pic_cli Subroutine

Set err if it is present, and do nothing if it is not.

fail pic_csr Subroutine

Set err to ERROR_VALIDATION with message, when err is present.

feed_integer pic_array_hash Subroutine

Feed the nbytes low-order bytes of value, least significant first.

Read more…
feed_integer64 pic_array_hash Subroutine

Feed the nbytes low-order bytes of value, least significant first.

Read more…
feed_logical pic_array_hash Subroutine

Feed one byte: 1 for true, 0 for false.

feed_logical64 pic_array_hash Subroutine

Feed one byte: 1 for true, 0 for false.

feed_real_dp pic_array_hash Subroutine

Canonicalise and feed one real(dp) value. See feed_real_sp for the ordering of the classification tests.

feed_real_dp64 pic_array_hash Subroutine

Canonicalise and feed one real(dp) value. See feed_real_sp64 for the ordering of the classification tests.

feed_real_record pic_array_hash Subroutine

Feed the fixed 14-byte canonical record of one real value.

feed_real_record64 pic_array_hash Subroutine

Feed the fixed 14-byte canonical record of one real value.

feed_real_sp pic_array_hash Subroutine

Canonicalise and feed one real(sp) value.

Read more…
feed_real_sp64 pic_array_hash Subroutine

Canonicalise and feed one real(sp) value.

Read more…
fill_3d_tensor_dp pic_array Subroutine

fill a tensor of datatype dp with a value

fill_3d_tensor_int32 pic_array Subroutine

fill a tensor of datatype int32 with a value

fill_3d_tensor_int64 pic_array Subroutine

fill a tensor of datatype int64 with a value

fill_3d_tensor_sp pic_array Subroutine

fill a tensor of datatype sp with a value

fill_matrix_dp pic_array Subroutine

fill a matrix of datatype dp with a value

fill_matrix_int32 pic_array Subroutine

fill a matrix of datatype int32 with a value

fill_matrix_int64 pic_array Subroutine

fill a matrix of datatype int64 with a value

fill_matrix_sp pic_array Subroutine

fill a matrix of datatype sp with a value

fill_vector_dp pic_array Subroutine

fill a vector of datatype dp with a value

fill_vector_int32 pic_array Subroutine

fill a vector of datatype int32 with a value

fill_vector_int64 pic_array Subroutine

fill a vector of datatype int64 with a value

fill_vector_sp pic_array Subroutine

fill a vector of datatype sp with a value

find pic_strings Interface

Finds the starting index of substring ‘pattern’ in the input ‘string’ Specifications

Read more…
find_char_char pic_strings Function

Returns the starting index of the ‘occurrence’th occurrence of substring ‘pattern’ in input ‘string’ Returns an integer

find_char_string pic_strings Function

Returns the starting index of the ‘occurrence’th occurrence of substring ‘pattern’ in input ‘string’ Returns an integer

find_entry pic_hash_map Function

Index of key in the insertion-order table, or 0 when absent.

find_or_create_region pic_profiler Function

Find an existing region by name or create a new one Returns -1 if MAX_REGIONS is exceeded

find_string_char pic_strings Function

Returns the starting index of the ‘occurrence’th occurrence of substring ‘pattern’ in input ‘string’ Returns an integer

find_string_string pic_strings Function

Returns the starting index of the ‘occurrence’th occurrence of substring ‘pattern’ in input ‘string’ Returns an integer

fix_nvhpc_octal_format pic_strings_to_string Function
fixed_array_dp_as_array pic_fixed_array Function

Copy of the live elements as a plain array of extent size(), not capacity(). Returns a zero-length array when empty. This is how the contents are handed to ordinary Fortran routines; note that it is the one operation here that does allocate, so keep it out of the hot path.

fixed_array_dp_at pic_fixed_array Subroutine

Bounds-checked element access, 1-based. Any index outside 1:size() (including indices that are within the capacity but beyond the live elements) sets value to zero and err to ERROR_VALIDATION. On success err is left untouched.

fixed_array_dp_capacity pic_fixed_array Function

Maximum number of elements, i.e. PIC_FIXED_ARRAY_CAPACITY.

fixed_array_dp_clear pic_fixed_array Subroutine

Drop every element. The storage itself is untouched, so this is a single integer assignment; the array can be reused immediately.

fixed_array_dp_get_unchecked pic_fixed_array Function

UNCHECKED element access for inner loops: no bounds check at all. The caller is responsible for guaranteeing 1 <= index <= size(), typically by looping over 1, array%size(). Reading an index outside that range returns undefined data. Use at unless the bounds check is measurably in the way.

fixed_array_dp_is_empty pic_fixed_array Function

True when no elements are live.

fixed_array_dp_is_full pic_fixed_array Function

True when a further push_back would fail.

fixed_array_dp_pop_back pic_fixed_array Subroutine

Remove and return the last element (LIFO). On an empty array value is set to zero and err is set to ERROR_VALIDATION. On success err is left untouched.

fixed_array_dp_push_back pic_fixed_array Subroutine

Append an element. If the array is already at capacity the element is not stored, the size is left unchanged and err is set to ERROR_VALIDATION. On success err is left untouched.

fixed_array_dp_size pic_fixed_array Function

Number of live elements.

fixed_array_int_as_array pic_fixed_array Function

Copy of the live elements as a plain array of extent size(), not capacity(). Returns a zero-length array when empty. This is how the contents are handed to ordinary Fortran routines; note that it is the one operation here that does allocate, so keep it out of the hot path.

fixed_array_int_at pic_fixed_array Subroutine

Bounds-checked element access, 1-based. Any index outside 1:size() (including indices that are within the capacity but beyond the live elements) sets value to zero and err to ERROR_VALIDATION. On success err is left untouched.

fixed_array_int_capacity pic_fixed_array Function

Maximum number of elements, i.e. PIC_FIXED_ARRAY_CAPACITY.

fixed_array_int_clear pic_fixed_array Subroutine

Drop every element. The storage itself is untouched, so this is a single integer assignment; the array can be reused immediately.

fixed_array_int_get_unchecked pic_fixed_array Function

UNCHECKED element access for inner loops: no bounds check at all. The caller is responsible for guaranteeing 1 <= index <= size(), typically by looping over 1, array%size(). Reading an index outside that range returns undefined data. Use at unless the bounds check is measurably in the way.

fixed_array_int_is_empty pic_fixed_array Function

True when no elements are live.

fixed_array_int_is_full pic_fixed_array Function

True when a further push_back would fail.

fixed_array_int_pop_back pic_fixed_array Subroutine

Remove and return the last element (LIFO). On an empty array value is set to zero and err is set to ERROR_VALIDATION. On success err is left untouched.

fixed_array_int_push_back pic_fixed_array Subroutine

Append an element. If the array is already at capacity the element is not stored, the size is left unchanged and err is set to ERROR_VALIDATION. On success err is left untouched.

fixed_array_int_size pic_fixed_array Function

Number of live elements.

flop_rate_add_flops pic_flop_rate Subroutine

add flops to the flop rate type, this will add the flops to the flop recorder Usage: call my_flop_rate%add_flops(1000)

Read more…
flop_rate_get_flop_rate pic_flop_rate Function

get the flop rate in GFLOP/s, this will calculate the flop rate based on the number of flops and the elapsed time

Read more…
flop_rate_get_flops pic_flop_rate Function

get the number of flops recorded in the flop rate type

Read more…
flop_rate_get_time pic_flop_rate Function

get the elapsed time in seconds from the timer contained in the flop rate type

Read more…
flop_rate_report pic_flop_rate Subroutine

report the flop rate, this will print the flop rate in GFLOP/s

Read more…
flop_rate_reset pic_flop_rate Subroutine

reset the flop rate type, this will reset the timer and the flop recorder

Read more…
flop_rate_start_time pic_flop_rate Subroutine

Calls the start method for the timer contained in the flop rate type

Read more…
flop_rate_stop_time pic_flop_rate Subroutine

Calls the stop method for the timer contained in the flop rate type

Read more…
flush_log_buffer pic_pure_logger Subroutine

Flush all buffered entries through the real logger, then clear the buffer. This is impure — call it once you are back outside the pure call chain.

Read more…
fnv1a_byte pic_array_hash Subroutine

One FNV-1a round: exclusive-or in a byte, then multiply by the prime.

Read more…
fnv1a_byte64 pic_array_hash Subroutine

One FNV-1a round: exclusive-or in a byte, then multiply by the prime.

Read more…
fnv_1_hash pic_hash_32bit_fnv Interface

FNV_1 interfaces

fnv_1a_hash pic_hash_32bit_fnv Interface

FNV_1A interfaces

fnv_mul_prime pic_hash_32bit_fnv Function

Multiply a 32-bit FNV state by the FNV prime, modulo 2**32.

Read more…
format_iso8601 pic_clock Function

ISO 8601, for example 2026-09-14T09:46:00.123Z.

Read more…
frame_col_count pic_ansi Function

Width the frame truncates to.

frame_invalidate pic_ansi Subroutine

Force the next render to emit every row.

Read more…
frame_render pic_ansi Function

The escape sequence that brings the screen up to date.

Read more…
frame_resize pic_ansi Subroutine

Set the frame’s dimensions, discarding the diff.

Read more…
frame_row_count pic_ansi Function

Number of lines the frame holds.

frame_set_line pic_ansi Subroutine

Set one line, truncated to the frame width in code points.

Read more…
ge_char_string pic_string_type Function

Compare two character sequences for being greater or equal In this version the right-hand side character sequences is by a string.

ge_string_char pic_string_type Function

Compare two character sequences for being greater or equal. In this version the left-hand side character sequences is by a string.

ge_string_string pic_string_type Function

Compare two character sequences for being greater or equal. In this version both character sequences are by a string.

get_first_arg_from_command_line pic_command_line Function

Get the first command line argument, expected to be a filename.

Read more…
get_flops pic_flop_recorder Function

Get the int64 number of FLOPs we currently have in the counter

Read more…
get_knowledge pic_knowledge Subroutine

I print random knowledge

get_precision pic_io Function

Get the current precision for real numbers

get_precision pic_io Interface

Obtain the current precision being used to print variables to strings

Read more…
get_threading_mode pic_array Interface

get_threading_mode returns the current threading mode for the array routines Usage: mode = get_threading_mode()

get_threading_mode_ pic_array Function

get the current threading mode for the array routines Usage: mode = get_threading_mode()

grow_buckets pic_hash_map Subroutine

Double the bucket table and rehash. Entry storage is never moved.

grow_int32 pic_heap Subroutine

integer(int32) counterpart of grow_int64.

grow_int64 pic_heap Subroutine

Reallocate arr to new_cap slots, keeping its first n_keep values.

Read more…
gt_char_string pic_string_type Function

Compare two character sequences for being greater. In this version the right-hand side character sequences is by a string.

gt_string_char pic_string_type Function

Compare two character sequences for being greater. In this version the left-hand side character sequences is by a string.

gt_string_string pic_string_type Function

Compare two character sequences for being greater. In this version both character sequences are by a string.

hash64_cdp_1 pic_array_hash Function
hash64_cdp_2 pic_array_hash Function
hash64_cdp_3 pic_array_hash Function
hash64_char_0 pic_array_hash Function
hash64_char_1 pic_array_hash Function
hash64_csp_1 pic_array_hash Function
hash64_csp_2 pic_array_hash Function
hash64_csp_3 pic_array_hash Function
hash64_int16_1 pic_array_hash Function
hash64_int16_2 pic_array_hash Function
hash64_int16_3 pic_array_hash Function
hash64_int32_1 pic_array_hash Function
hash64_int32_2 pic_array_hash Function
hash64_int32_3 pic_array_hash Function
hash64_int64_1 pic_array_hash Function
hash64_int64_2 pic_array_hash Function
hash64_int64_3 pic_array_hash Function
hash64_int8_1 pic_array_hash Function
hash64_int8_2 pic_array_hash Function
hash64_int8_3 pic_array_hash Function
hash64_logical_1 pic_array_hash Function
hash64_logical_2 pic_array_hash Function
hash64_logical_3 pic_array_hash Function
hash64_rdp_1 pic_array_hash Function
hash64_rdp_2 pic_array_hash Function
hash64_rdp_3 pic_array_hash Function
hash64_rsp_1 pic_array_hash Function
hash64_rsp_2 pic_array_hash Function
hash64_rsp_3 pic_array_hash Function
hash_cdp_1 pic_array_hash Function
hash_cdp_2 pic_array_hash Function
hash_cdp_3 pic_array_hash Function
hash_char_0 pic_array_hash Function
hash_char_1 pic_array_hash Function
hash_csp_1 pic_array_hash Function
hash_csp_2 pic_array_hash Function
hash_csp_3 pic_array_hash Function
hash_int16_1 pic_array_hash Function
hash_int16_2 pic_array_hash Function
hash_int16_3 pic_array_hash Function
hash_int32_1 pic_array_hash Function
hash_int32_2 pic_array_hash Function
hash_int32_3 pic_array_hash Function
hash_int64_1 pic_array_hash Function
hash_int64_2 pic_array_hash Function
hash_int64_3 pic_array_hash Function
hash_int8_1 pic_array_hash Function
hash_int8_2 pic_array_hash Function
hash_int8_3 pic_array_hash Function
hash_logical_1 pic_array_hash Function
hash_logical_2 pic_array_hash Function
hash_logical_3 pic_array_hash Function
hash_map_at pic_hash_map Subroutine

Fetch the entry at position in the iteration order, counting from 1. This is the exact-fidelity iteration accessor: key comes back with the key’s true length, trailing blanks included.

Read more…
hash_map_bucket_count pic_hash_map Function

Current number of buckets, 0 while the map is unallocated. Exposed so that callers and tests can observe growth; it never affects iteration order.

hash_map_clear pic_hash_map Subroutine

Remove every entry but keep the allocated capacity, so that refilling the map does not have to reallocate. A cleared map iterates as empty and the next insert starts a fresh insertion order at position 1.

hash_map_destroy pic_hash_map Subroutine

Release every buffer and return the map to the unallocated state.

hash_map_get pic_hash_map Subroutine

Look up key. A missing key is an ordinary outcome, not an error: found comes back .false. and value is set to 0.

hash_map_has_key pic_hash_map Function

.true. when key is stored in the map.

hash_map_init pic_hash_map Subroutine

Allocate the map, discarding any entries it already held.

Read more…
hash_map_insert pic_hash_map Subroutine

Insert key with value, or overwrite the value of an existing key.

Read more…
hash_map_is_empty pic_hash_map Function

.true. when the map holds no entries.

hash_map_keys pic_hash_map Function

All keys, in insertion order.

Read more…
hash_map_remove pic_hash_map Subroutine

Remove key from the map.

Read more…
hash_map_size pic_hash_map Function

Number of entries currently stored.

hash_map_values pic_hash_map Function

All values, in insertion order. values() and keys() are index aligned: values(i) belongs to keys(i). Zero-sized for an empty map.

hash_rdp_1 pic_array_hash Function
hash_rdp_2 pic_array_hash Function
hash_rdp_3 pic_array_hash Function
hash_rsp_1 pic_array_hash Function
hash_rsp_2 pic_array_hash Function
hash_rsp_3 pic_array_hash Function
heap_build_from pic_heap Subroutine

Replace the heap contents with keys/payloads, heapified in O(n).

Read more…
heap_capacity pic_heap Function

Number of entries the heap can hold before it has to grow.

heap_clear pic_heap Subroutine

Remove every entry but keep the allocated storage for reuse.

Read more…
heap_destroy pic_heap Subroutine

Release the heap storage and reset it to empty.

heap_init pic_heap Subroutine

Initialise the heap, discarding any previous contents.

Read more…
heap_is_empty pic_heap Function

.true. when the heap holds no entries.

heap_peek pic_heap Subroutine

Return the root entry without removing it.

Read more…
heap_pop pic_heap Subroutine

Remove and return the root entry (minimum, or maximum for a max-heap).

Read more…
heap_push pic_heap Subroutine

Insert one (key, payload) entry in O(log n).

Read more…
heap_reserve pic_heap Subroutine

Ensure room for at least n entries without further reallocation.

Read more…
heap_size pic_heap Function

Number of entries currently in the heap.

home_bucket pic_hash_map Function

Bucket a key hashes to before probing.

Read more…
host_is_little_endian pic_serialize Function

Report whether the running machine stores the least significant byte of an integer first.

Read more…
iachar pic_string_type Interface

Code in ASCII collating sequence.

Read more…
iachar_string pic_string_type Function

Code in ASCII collating sequence.

ichar pic_string_type Interface

Character-to-integer conversion function.

Read more…
ichar_string pic_string_type Function

Character-to-integer conversion function.

increment_digits pic_format Subroutine

Add one to a decimal digit string, growing it on carry out.

index pic_string_type Interface

Position of a substring within a string.

Read more…
index_char_string pic_string_type Function

Position of a sequence of character within a character sequence. In this version the sub character sequence is represented by a string.

index_string_char pic_string_type Function

Position of a sequence of character within a character sequence. In this version the main character sequence is represented by a string.

index_string_string pic_string_type Function

Position of a sequence of character within a character sequence. In this version both character sequences are represented by a string.

info pic_logger Subroutine

Log a message that will only be printed at the info level of verbosity

Read more…
int16_fnv_1 pic_hash_32bit_fnv Function
int16_fnv_1a pic_hash_32bit_fnv Function
int32_decrease_ord_sort pic_sorting_ord_sort Subroutine
int32_decrease_sort pic_sorting_sort Subroutine
int32_fnv_1 pic_hash_32bit_fnv Function
int32_fnv_1a pic_hash_32bit_fnv Function
int32_increase_ord_sort pic_sorting_ord_sort Subroutine
int32_increase_sort pic_sorting_sort Subroutine
int64_decrease_ord_sort pic_sorting_ord_sort Subroutine
int64_decrease_sort pic_sorting_sort Subroutine
int64_fnv_1 pic_hash_32bit_fnv Function
int64_fnv_1a pic_hash_32bit_fnv Function
int64_increase_ord_sort pic_sorting_ord_sort Subroutine
int64_increase_sort pic_sorting_sort Subroutine
int8_fnv_1 pic_hash_32bit_fnv Function

The original FNV-1 8-bit key algorithm.

int8_fnv_1a pic_hash_32bit_fnv Function

The original FNV-1a 8-bit key algorithm.

is_alpha pic_ascii Function

Checks whether c is an ASCII letter (A .. Z, a .. z).

is_alphanum pic_ascii Function

Checks whether c is a letter or a number (0 .. 9, a .. z, A .. Z).

is_ascii pic_ascii Function

Checks whether or not c is in the ASCII character set - i.e. in the range 0 .. 0x7F.

is_blank pic_ascii Function

Checks whether or not c is a blank character. That includes the only the space and tab characters

is_close pic_math Interface

Test two floating-point values for approximate equality.

Read more…
is_close_dp pic_math Function

Approximate equality for real(dp) values.

is_close_sp pic_math Function

Approximate equality for real(sp) values.

is_control pic_ascii Function

Checks whether c is a control character.

is_digit pic_ascii Function

Checks whether c is a digit (0 .. 9).

is_equal pic_test_helpers Interface

The is equal interface is used to circumvent the fact that Fortran, rightfully, complains about comparing two reals without involving a tolerance, i.e. if(a == b) since there is no guarantee that the two reals are exactly equal due to floating point precision issues. The functions are defined as elemental

Read more…
is_equal_dp pic_test_helpers Function
is_equal_sp pic_test_helpers Function
is_graphical pic_ascii Function

Checks whether or not c is a printable character other than the space character.

is_hex_digit pic_ascii Function

Checks whether c is a digit in base 16 (0 .. 9, A .. F, a .. f).

is_in_range pic_math Interface

Test whether a value lies within the inclusive range [lo, hi].

Read more…
is_in_range_dp pic_math Function

Inclusive range test for real(dp).

is_in_range_int32 pic_math Function

Inclusive range test for integer(int32).

is_in_range_int64 pic_math Function

Inclusive range test for integer(int64).

is_in_range_sp pic_math Function

Inclusive range test for real(sp).

is_long pic_cli Function

Whether arg is a --name form. A bare -- is not.

is_lower pic_ascii Function

Checks whether c is a lowercase ASCII letter (a .. z).

is_negative pic_format Function

True for negative values. The result for negative zero is processor dependent, so callers must not rely on it: every caller here tests value == 0 first and drops the sign for zero. Not valid for NaN, which the callers have already filtered out.

is_octal_digit pic_ascii Function

Checks whether c is a digit in base 8 (0 .. 7).

is_pic_error_code pic_error Function

True when code falls inside the range PIC reserves for its own error codes (0 .. PIC_ERROR_CODE_MAX). Downstream libraries can assert their own codes are outside it: if (is_pic_error_code(MYLIB_ERROR_SOCKET)) error stop “code clash”

is_printable pic_ascii Function

Checks whether or not c is a printable character - including the space character.

is_punctuation pic_ascii Function

Checks whether or not c is a punctuation character. That includes all ASCII characters which are not control characters, letters, digits, or whitespace.

is_short pic_cli Function

Whether arg is a -s form. A bare - is not, and neither is a negative number, which must be able to reach a positional.

is_sorted pic_array Interface

is_sorted provides a simple way to checking if a 1d array is sorted it is implemented for int32, int64, sp, and dp datatypes. The default is to check if an array is sorted in ascending fashion.

Read more…
is_sorted_char pic_array Function

check if a 1d array of type char is sorted

is_sorted_dp pic_array Function

check if a 1d array of type dp is sorted

is_sorted_int32 pic_array Function

check if a 1d array of type int32 is sorted

is_sorted_int64 pic_array Function

check if a 1d array of type int64 is sorted

is_sorted_sp pic_array Function

check if a 1d array of type sp is sorted

is_upper pic_ascii Function

Checks whether c is an uppercase ASCII letter (A .. Z).

is_white pic_ascii Function

Checks whether or not c is a whitespace character. That includes the space, tab, vertical tab, form feed, carriage return, and linefeed characters.

join pic_strings Interface

Joins an array of strings into a single string. The chunks are separated with a space, or an optional user-defined separator.

join_char pic_strings Function

Joins a list of strings with a separator (default: space). Returns a new string

join_string pic_strings Function

Joins a list of strings with a separator (default: space). Returns a new string

key_matches pic_hash_map Function

Exact key comparison: same length and same characters. Deliberately not the Fortran == operator, which blank-pads the shorter operand.

knowledge pic_logger Subroutine

Log a message that will only be printed at the error of verbosity

Read more…
large_info pic_logger Subroutine

Log a message that will only be printed at the large_info level of verbosity

Read more…
le_char_string pic_string_type Function

Compare two character sequences for being less or equal In this version the right-hand side character sequences is by a string.

le_string_char pic_string_type Function

Compare two character sequences for being less or equal. In this version the left-hand side character sequences is by a string.

le_string_string pic_string_type Function

Compare two character sequences for being less or equal. In this version both character sequences are by a string.

len_string pic_string_type Function

Returns the length of the character sequence represented by the string.

len_trim pic_string_type Interface

Returns the length of the character sequence without trailing spaces represented by the string.

Read more…
len_trim_string pic_string_type Function

Returns the length of the character sequence without trailing spaces represented by the string.

lge pic_string_type Interface

Lexically compare the order of two character sequences being greater equal, The left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
lge_char_string pic_string_type Function

Lexically compare two character sequences for being greater or equal In this version the right-hand side character sequences is by a string.

lge_string_char pic_string_type Function

Lexically compare two character sequences for being greater or equal. In this version the left-hand side character sequences is by a string.

lge_string_string pic_string_type Function

Lexically compare two character sequences for being greater or equal. In this version both character sequences are by a string.

lgt pic_string_type Interface

Lexically compare the order of two character sequences being greater, The left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
lgt_char_string pic_string_type Function

Lexically compare two character sequences for being greater. In this version the right-hand side character sequences is by a string.

lgt_string_char pic_string_type Function

Lexically compare two character sequences for being greater. In this version the left-hand side character sequences is by a string.

lgt_string_string pic_string_type Function

Lexically compare two character sequences for being greater. In this version both character sequences are by a string.

limb_to_digits pic_format Subroutine

Expand one limb into exactly LIMB_DIGITS zero padded characters, table driven the same way pic_strings converts integers.

lle pic_string_type Interface

Lexically compare the order of two character sequences being less equal, The left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
lle_char_string pic_string_type Function

Lexically compare two character sequences for being less or equal In this version the right-hand side character sequences is by a string.

lle_string_char pic_string_type Function

Lexically compare two character sequences for being less or equal. In this version the left-hand side character sequences is by a string.

lle_string_string pic_string_type Function

Lexically compare two character sequences for being less or equal. In this version both character sequences are by a string.

llt pic_string_type Interface

Lexically compare the order of two character sequences being less, The left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
llt_char_string pic_string_type Function

Lexically compare two character sequences for being less. In this version the right-hand side character sequences is by a string.

llt_string_char pic_string_type Function

Lexically compare two character sequences for being less. In this version the left-hand side character sequences is by a string.

llt_string_string pic_string_type Function

Lexically compare two character sequences for being less. In this version both character sequences are by a string.

log pic_logger Subroutine

internal subroutines that processes the message and filters it according to the verbosity level set by the user or the default this is a private subroutine so it is not exposed to the user

looks_numeric pic_cli Function

Whether arg is a negative number rather than an option.

Read more…
lt_char_string pic_string_type Function

Compare two character sequences for being less. In this version the right-hand side character sequences is by a string.

lt_string_char pic_string_type Function

Compare two character sequences for being less. In this version the left-hand side character sequences is by a string.

lt_string_string pic_string_type Function

Compare two character sequences for being less. In this version both character sequences are by a string.

match_sequence pic_ansi Subroutine

Test whether seq is a finished escape sequence.

Read more…
maybe pic_string_type Function

Safely return the character sequences represented by the string

mean pic_statistics Interface

Arithmetic mean of a 1-D array, returned as real(dp).

Read more…
mean_dp pic_statistics Function

Mean of a real(dp) array.

mean_int32 pic_statistics Function

Mean of an integer(int32) array.

mean_int64 pic_statistics Function

Mean of an integer(int64) array.

mean_sp pic_statistics Function

Mean of a real(sp) array.

min_max pic_statistics Interface

Minimum and maximum of a 1-D array in a single length-2 result.

Read more…
min_max_dp pic_statistics Function

Minimum and maximum of a real(dp) array.

min_max_int32 pic_statistics Function

Minimum and maximum of an integer(int32) array.

min_max_int64 pic_statistics Function

Minimum and maximum of an integer(int64) array.

min_max_sp pic_statistics Function

Minimum and maximum of a real(sp) array.

mix64 pic_rng Function

The SplitMix64 finalising mix (the “MurmurHash3-style” avalanche used by splitmix64.c). Used both as the generator output stage and as the seed derivation function for stream_for.

monotonic_ms pic_clock Function

Milliseconds from an unspecified origin, or PIC_CLOCK_NO_CLOCK.

Read more…
monotonic_scaled pic_clock Function

Shared body of monotonic_ms and monotonic_us.

monotonic_us pic_clock Function

Microseconds from an unspecified origin, or PIC_CLOCK_NO_CLOCK.

move pic_string_type Interface

Moves the allocated character scalar from ‘from’ to ‘to’

move_char_char pic_string_type Subroutine

Moves the allocated character scalar from ‘from’ to ‘to’ No output

move_char_string pic_string_type Subroutine

Moves the allocated character scalar from ‘from’ to ‘to’ No output

move_string_char pic_string_type Subroutine

Moves the allocated character scalar from ‘from’ to ‘to’ No output

move_string_string pic_string_type Subroutine

Moves the allocated character scalar from ‘from’ to ‘to’ No output

ne_char_string pic_string_type Function

Compare two character sequences for inequality. In this version the right-hand side character sequences is by a string.

ne_string_char pic_string_type Function

Compare two character sequences for inequality. In this version the left-hand side character sequences is by a string.

ne_string_string pic_string_type Function

Compare two character sequences for inequality. In this version both character sequences are by a string.

next_below pic_rng Interface

Draw a uniform integer in [0, n) by rejection sampling.

Read more…
next_bernoulli_ppm pic_random_dist Interface

Return true with probability ppm in a million.

Read more…
next_exponential_dp pic_random_dist_real Interface

Draw an exponential deviate with the given mean.

Read more…
next_exponential_int pic_random_dist Interface

Draw an exponentially distributed integer with the given mean, in whatever unit mean is expressed in.

Read more…
next_normal_dp pic_random_dist_real Interface

Draw a normal deviate with mean mu and standard deviation sigma.

Read more…
next_poisson_int pic_random_dist Interface

Draw a Poisson-distributed count with mean mean_milli/1000.

Read more…
next_positional pic_cli Subroutine

Index of the next unfilled positional, advancing used.

Read more…
next_range pic_random_dist Interface

Draw a uniform integer in the inclusive range [lo, hi].

Read more…
next_real_dp pic_rng Interface

Draw a uniform real(dp) in [0, 1).

Read more…
now_local pic_clock Subroutine

The current local date and time.

Read more…
now_utc pic_clock Subroutine

The current date and time in UTC, with utc_offset_min zero.

Read more…
nvtx_range_pop pic_profiler Subroutine

Pop an NVTX range (no-op if PIC_USE_NVTX not defined)

nvtx_range_push pic_profiler Subroutine

Push an NVTX range (no-op if PIC_USE_NVTX not defined)

offset_text pic_clock Function

The trailing zone designator of an ISO 8601 timestamp.

omitted_note pic_error Function

One-line notice that count intermediate causes were dropped

operator(.haserror.) pic_error Interface

Operator for checking error state: if (.haserror. err) then

operator(//) pic_string_type Interface

Concatenate two character sequences, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(/=) pic_string_type Interface

Compare two character sequences for inequality, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(<) pic_string_type Interface

Compare two character sequences for being less, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(<=) pic_string_type Interface

Compare two character sequences for being less than, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(==) pic_string_type Interface

Compare two character sequences for equality, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(>) pic_string_type Interface

Compare two character sequences for being greater, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
operator(>=) pic_string_type Interface

Compare two character sequences for being greater than, the left-hand side, the right-hand side or both character sequences can be represented by a string.

Read more…
optional_char pic_optional_value Function

Handle optional character(len=*) value

optional_dp pic_optional_value Function

Handle optional real(dp) value

optional_int32 pic_optional_value Function

Handle optional integer(int32) value

optional_int64 pic_optional_value Function

Handle optional integer(int64) value

optional_logical pic_optional_value Function

Handle optional logical value

optional_sp pic_optional_value Function

Handle optional real(sp) value

ord_sort pic_sorting Interface

The generic subroutine interface implementing the ORD_SORT algorithm, a translation to Fortran 2008, of the "Rust" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 ORD_SORT is a hybrid stable comparison algorithm combining merge sort, and insertion sort.

Read more…
pad pic_io Function

function to pad a string with a certain number of characters for nice printing

pad pic_io Interface

adds a number X of spaces to the left of a “string” whcih is just a collection of characters. Mostly used for nice printing

Read more…
pad pic_clock Function

value in decimal, zero filled on the left to width characters. A value too wide to fit is not truncated; the field simply grows.

Read more…
pad_left pic_format Function

Blank pad on the left, widening rather than truncating.

padl pic_strings Interface

Left pad the input string

padl_char_default pic_strings Function

Left pad the input string with ” ” (1 whitespace)

Read more…
padl_char_pad_with pic_strings Function

Left pad the input string with the ‘pad_with’ character

Read more…
padl_string_default pic_strings Function

Left pad the input string with ” ” (1 whitespace)

Read more…
padl_string_pad_with pic_strings Function

Left pad the input string with the ‘pad_with’ character

Read more…
padr pic_strings Interface

Right pad the input string

padr_char_default pic_strings Function

Right pad the input string with ” ” (1 whitespace)

Read more…
padr_char_pad_with pic_strings Function

Right pad the input string with the ‘pad_with’ character

Read more…
padr_string_default pic_strings Function

Right pad the input string with ” ” (1 whitespace)

Read more…
padr_string_pad_with pic_strings Function

Right pad the input string with the ‘pad_with’ character

Read more…
parse_int pic_tokenizer Interface

Parse a string into an integer, reporting failures through error_t.

Read more…
parse_int_int32_char pic_tokenizer Subroutine

Parse a character string into a 32 bit integer.

parse_int_int32_string pic_tokenizer Subroutine

Parse a string_type into a 32 bit integer.

parse_int_int64_char pic_tokenizer Subroutine

Parse a character string into a 64 bit integer.

parse_int_int64_string pic_tokenizer Subroutine

Parse a string_type into a 64 bit integer.

parse_integer_wide pic_tokenizer Subroutine

Core integer parser, accumulating in int64.

Read more…
parse_real pic_tokenizer Interface

Parse a string into a real, reporting failures through error_t.

Read more…
parse_real_dp_char pic_tokenizer Subroutine

Parse a character string into a double precision real.

parse_real_dp_string pic_tokenizer Subroutine

Parse a string_type into a double precision real.

parse_real_sp_char pic_tokenizer Subroutine

Parse a character string into a single precision real.

Read more…
parse_real_sp_string pic_tokenizer Subroutine

Parse a string_type into a single precision real.

parse_real_wide pic_tokenizer Subroutine

Core real parser.

Read more…
particle_soa_allocate pic_soa_particle Subroutine

Give the container n live elements, discarding any it already had.

Read more…
particle_soa_capacity pic_soa_particle Function

Allocated length of every field array. Always at least size().

particle_soa_clear pic_soa_particle Subroutine

Drop every live element but keep the allocated capacity.

Read more…
particle_soa_deallocate pic_soa_particle Subroutine

Release every field array and reset both counters to zero.

particle_soa_deserialize pic_soa_particle Subroutine

Read a container back from an open stream unit.

Read more…
particle_soa_resize pic_soa_particle Subroutine

Change the number of live elements, preserving the elements that survive.

Read more…
particle_soa_serialize pic_soa_particle Subroutine

Write the container to an open stream unit.

Read more…
particle_soa_serialized_bytes pic_soa_particle Function

Exact size in bytes of the stream serialize would write now.

particle_soa_size pic_soa_particle Function

Number of live elements.

particle_soa_state_hash pic_soa_particle Function

32-bit FNV-1a digest of the container’s live state.

Read more…
particle_soa_state_hash64 pic_soa_particle Function

64-bit FNV-1a digest of the container’s live state.

Read more…
path_cost pic_graph Subroutine

Total weight of walking path through graph.

Read more…
pcg32_next pic_rng Function

Next 32-bit output, returned as the int32 with the same bit pattern as the reference implementation’s uint32_t result. Roughly half of the returned values are therefore negative; use next_real_dp or next_below if a magnitude is wanted.

pcg32_next_below pic_rng Function

Uniform integer in [0, n) from a PCG32 generator. Each attempt consumes two 32-bit outputs, so the stream stays word aligned no matter how many rejections occur.

pcg32_next_bernoulli_ppm pic_random_dist Function

True with probability ppm in a million, from a pcg32_t generator.

pcg32_next_exponential_dp pic_random_dist_real Function

Exponential deviate from a PCG32 generator.

pcg32_next_exponential_int pic_random_dist Function

Exponential integer with the given mean, from a pcg32_t generator.

pcg32_next_normal_dp pic_random_dist_real Function

Normal deviate from a PCG32 generator.

pcg32_next_poisson_int pic_random_dist Function

Poisson count with mean mean_milli/1000, from a pcg32_t generator.

pcg32_next_range pic_random_dist Function

Uniform integer in [lo, hi] from a pcg32_t generator.

pcg32_next_real_dp pic_rng Function

Uniform real(dp) in [0, 1) from a PCG32 generator. Consumes two 32-bit outputs.

pcg32_next_u64 pic_rng Function

Full 64-bit random word built from two consecutive 32-bit outputs; the first output supplies the high half. Fixing the order here is what makes next_real_dp and next_below reproducible for this engine.

pcg32_seed pic_rng Subroutine

Seed the generator, following the reference pcg32_srandom_r: the stream selector is shifted left and forced odd to become the LCG increment, then the state is warmed up, offset by the requested state and warmed up again.

pcg32_step pic_rng Function

Advance the LCG one step and return the XSH-RR permutation of the previous state as an unsigned value in [0, 2**32).

pcg32_uniform_below pic_random_dist Function

Uniform unsigned integer in [0, span_minus_1], by rejection.

pending_clear pic_ansi Subroutine

Forget any partial escape sequence.

pending_is_empty pic_ansi Function

Whether a partial sequence is being carried.

performance pic_logger Subroutine

Log a message that will only be printed at the performance of verbosity

Read more…
pic_copy pic_array Interface

copy provides a blas-less implementation of xcopy where x is (i,s,d) icopy, scopy, dcopy if you built pic with BLAS use the copy interface provided there, I will not beat BLAS copy is implemented for (int32, int64, sp, dp) for 1 and 2d arrays of the same types

Read more…
pic_fill pic_array Interface

fill provides a generic interface to assing a value alpha of types (int32, int64, sp, dp) as defined in pic_types.F90 The inteface supports filling 1d and 2d arrays of the specified variables

Read more…
pic_optional pic_optional_value Interface

Overloaded interface for optional value retrieval, supported types are: - integer(int32), integer(int64), real(sp), real(dp), character(len=*), logical

pic_print_array pic_array Interface

Generic interface for printing arrays of different types

Read more…
pic_print_banner pic Subroutine

my cool banner, work in progress

pic_scramble_array pic_array Interface
pic_sum pic_array Interface

pic_sum provides a threaded alternative to the sum(array) Fortran intrinsic which will be too slow for large sizes of vectors and matrices. Note that this provides the total sum. As opposed to the blas alternative XASUM which does the absolute sum

Read more…
pic_transpose pic_array Interface

pic_transpose provides a blas-less, threaded alternative to the Fortran transpose intrinsic which will be slow for large matrix sizes. pic_transpose does not assume symmetric matrices

Read more…
precedes pic_heap Function

.true. when entry left must pop before entry right.

Read more…
print_3d_tensor_dp pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_int32 pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_int64 pic_array Subroutine

Print a 3D tensor of values

print_3d_tensor_sp pic_array Subroutine

Print a 3D tensor of values

print_asterisk_row pic_io Subroutine

prints a convenient row of asterisks of length n

print_matrix_dp pic_array Subroutine

print a matrix of values

print_matrix_int32 pic_array Subroutine

print a matrix of values

print_matrix_int64 pic_array Subroutine

print a matrix of values

print_matrix_sp pic_array Subroutine

print a matrix of values

print_packed_matrix_dp pic_array Subroutine

Print a packed lower triangular matrix of values

Read more…
print_packed_matrix_int32 pic_array Subroutine

Print a packed lower triangular matrix of values

Read more…
print_packed_matrix_int64 pic_array Subroutine

Print a packed lower triangular matrix of values

Read more…
print_packed_matrix_sp pic_array Subroutine

Print a packed lower triangular matrix of values

Read more…
print_vector_dp pic_array Subroutine

print a vector of values

print_vector_int32 pic_array Subroutine

print a vector of values

print_vector_int64 pic_array Subroutine

print a vector of values

print_vector_sp pic_array Subroutine

print a vector of values

probe_free pic_hash_map Function

First empty bucket in the probe sequence of key. The load factor keeps at least one bucket empty at all times, so this always finds one.

profiler_disable pic_profiler Subroutine

Disable profiling temporarily

Read more…
profiler_enable pic_profiler Subroutine

Enable profiling (if it was disabled)

profiler_finalize pic_profiler Subroutine

Finalize the profiler and release resources

Read more…
profiler_get_time pic_profiler Function

Get accumulated time for a named region

Read more…
profiler_init pic_profiler Subroutine

Initialize the profiler

Read more…
profiler_report pic_profiler Subroutine

Print profiling report sorted by time

Read more…
profiler_reset pic_profiler Subroutine

Reset all timing data while keeping region names

Read more…
profiler_start pic_profiler Subroutine

Start a named profiling region

Read more…
profiler_stop pic_profiler Subroutine

Stop a profiling region

Read more…
pure_debug pic_pure_logger Subroutine

Buffer a debug-level message

pure_error pic_pure_logger Subroutine

Buffer an error-level message

pure_info pic_pure_logger Subroutine

Buffer an info-level message

pure_knowledge pic_pure_logger Subroutine

Buffer a knowledge-level message

pure_large_info pic_pure_logger Subroutine

Buffer a large_info-level message

pure_performance pic_pure_logger Subroutine

Buffer a performance-level message

pure_verbose pic_pure_logger Subroutine

Buffer a verbose-level message

pure_warning pic_pure_logger Subroutine

Buffer a warning-level message

radix_sort pic_sorting Interface

The generic subroutine interface implementing the LSD radix sort algorithm, see https://en.wikipedia.org/wiki/Radix_sort for more details. It is always O(N) in sorting random data, but need a O(N) buffer. (Specification)

radix_sort_u32_helper pic_sorting_radix_sort Subroutine
radix_sort_u64_helper pic_sorting_radix_sort Subroutine
read (formatted) pic_string_type Interface

Read a character sequence from a connected unformatted unit into the string.

read (unformatted) pic_string_type Interface

Read a character sequence from a connected unformatted unit into the string.

read_array pic_serialize Interface

Read one record back, validating its type tag and its length.

Read more…
read_char_record pic_serialize Subroutine

Read a character scalar record into a deferred length string.

Read more…
read_formatted pic_string_type Subroutine

Read a character sequence from a connected formatted unit into the string.

read_header pic_serialize Subroutine

Read and validate the stream header.

Read more…
read_int32_array pic_serialize Subroutine

Read an integer(int32) array record.

read_int64_array pic_serialize Subroutine

Read an integer(int64) array record.

read_real_dp_array pic_serialize Subroutine

Read a real(dp) array record. See read_real_sp_array for the way the foreign endian path is kept away from the native one.

read_real_sp_array pic_serialize Subroutine

Read a real(sp) array record.

Read more…
read_record_header pic_serialize Subroutine

Read a record header, check the type tag, and bounds check the announced payload against the real length of the file.

Read more…
read_unformatted pic_string_type Subroutine

Read a character sequence from a connected unformatted unit into the string.

real_from_word pic_rng Function

Turn a 64-bit random word into a real(dp) in [0, 1) using its top 53 bits. See the next_real_dp interface documentation for the exactness argument.

rebuild_buckets pic_hash_map Subroutine

Re-index every entry into the bucket table. Touches buckets only, so the insertion order is untouched by construction.

record_bytes pic_serialize Function

Total on disk size of a record, including its 12 byte record header.

Read more…
rejection_mask pic_rng Function

Smallest 2**k - 1 that is at least n - 1, for n >= 1.

rejection_mask pic_random_dist Function

Smallest 2**k - 1 that covers span_minus_1 read as unsigned.

Read more…
remove_from_stack pic_profiler Subroutine

Remove a region index from the stack (helper for explicit stop)

repeat pic_string_type Interface

Repeats the character sequence hold by the string by the number of specified copies.

Read more…
repeat_string pic_string_type Function

Repeats the character sequence hold by the string by the number of specified copies.

replace_all pic_strings Interface

Replaces all the occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Version: experimental

replace_all_char_char_char pic_strings Function

Replaces all the occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_char_char_string pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_char_string_char pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_char_string_string pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_string_char_char pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_string_char_string pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_string_string_char pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

replace_all_string_string_string pic_strings Function

Replaces all occurrences of substring ‘pattern’ in the input ‘string’ with the replacement ‘replacement’ Returns a new string

reserve_entries pic_hash_map Subroutine

Ensure the insertion-order arrays hold at least needed entries. Explicit allocate/copy/move_alloc rather than reallocation-on-assignment, which is shaky on some supported compilers.

reserve_pool pic_hash_map Subroutine

Ensure the packed key pool holds at least needed characters.

reset_flop_counter pic_flop_recorder Subroutine

Resets the flop counter to 0_int64

Read more…
reverse pic_string_type Interface

Reverses the character sequence hold by the input string

Read more…
reverse pic_ascii Function

Reverse the character order in the input character variable

Read more…
reverse pic_ascii Interface

Returns a new character sequence which is reverse of the input charater sequence This method is elemental and returns a character sequence

reverse_string pic_string_type Function

Reverse the character sequence hold by the input string

root_entry pic_heap Function

Fetch the root entry, reporting an error when the heap is empty.

rotate_right32 pic_rng Function

Rotate the low 32 bits of x right by rot bits, 0 <= rot <= 31. Branch free: when rot is zero the left-shifted term is shifted clean out of the low 32 bits and the mask removes it.

round_decimal pic_format Subroutine

Round an exact digit string to n_keep leading digits, half to even.

Read more…
scale_by_mean pic_random_dist Function

Multiply a Q32.32 value by an integer mean and drop the fraction.

Read more…
scan pic_string_type Interface

Scan a string for the presence of a set of characters. Scans a string for any of the characters in a set of characters.

Read more…
scan_char_string pic_string_type Function

Scan a character sequence for any of the characters in a set of characters. In this version the set of characters is represented by a string.

scan_string_char pic_string_type Function

Scan a character sequence for any of the characters in a set of characters. In this version the character sequences is represented by a string.

scan_string_string pic_string_type Function

Scan a character sequence for any of the characters in a set of characters. In this version both the character sequence and the character set are represented by a string.

scramble_array_character pic_array Subroutine

should not be used, intended for testing purposes. randomizes an array of type char

scramble_array_dp pic_array Subroutine

should not be used, intended for testing purposes. randomizes an array of type dp

scramble_array_int32 pic_array Subroutine

should not be used, intended for testing purposes. randomizes an array of type int32

scramble_array_int64 pic_array Subroutine

should not be used, intended for testing purposes. randomizes an array of type int64

scramble_array_sp pic_array Subroutine

should not be used, intended for testing purposes. randomizes an array of type sp

serialize_close pic_serialize Subroutine

Close a unit previously opened by one of the open helpers.

serialize_open_read pic_serialize Subroutine

Open an existing serialized stream for reading.

serialize_open_write pic_serialize Subroutine

Open filename for writing a serialized stream, replacing any existing file.

Read more…
set_brackets pic_array Subroutine

Set brackets based on output format type

Read more…
set_explicit_printing pic_logger Subroutine

Configure whether logs should include explicit level prefixes.

Read more…
set_precision pic_io Interface

This routine overrides the default dp precision used for printing strings in the to_char function, the default is : integer(default_int), parameter :: default_dp_precision = 12

Read more…
set_precision_internal pic_io Subroutine

Set the precision for real numbers

set_threading_mode pic_array Interface

set_threading sets the threading mode for the array routines this will set the use_threaded variable to true or false depending on the input Usage: call set_threading_mode(.true.) or call set_threading_mode(.false.)

set_threading_mode_ pic_array Subroutine

set the threading mode for the array routines, this will set the use_threaded variable to true or false depending on the input

Read more…
set_to_string pic_strings Function

Implementation to transfer a set of characters to a string representing the set.

Read more…
sift_down pic_heap Subroutine

Move entry start towards the leaves until the heap property holds.

sift_up pic_heap Subroutine

Move entry start towards the root until the heap property holds.

skip_sign pic_tokenizer Subroutine

Advance pos past a leading + or - if one is present.

slen pic_string_type Interface

Returns the length of the character sequence represented by the string.

Read more…
slice pic_strings Interface

Extracts characters from the input string to return a new string

Read more…
slice_char pic_strings Function

Extract the characters from the region between ‘first’ and ‘last’ index (both inclusive) of the input ‘string’ by taking strides of length ‘stride’ Returns a new string

slice_string pic_strings Function

Extract the characters from the region between ‘first’ and ‘last’ index (both inclusive) of the input ‘string’ by taking strides of length ‘stride’ Returns a new string

soa_check_alloc pic_soa Subroutine

Turn a non-zero stat= from an allocate into ERROR_ALLOC.

soa_check_field_count pic_soa Subroutine

Verify that a field record read back holds the expected element count.

soa_check_live_count pic_soa Subroutine

Verify that n live elements really exist in a field array.

Read more…
soa_check_resize_args pic_soa Subroutine

Validate the arguments of a field resize.

Read more…
soa_field_code pic_soa Function

Short schema spelling of a field kind code, or "?" if unknown.

Read more…
soa_field_tag pic_soa Function

pic_serialize record tag a field kind is stored as, or -1 if the kind is unknown. A logical field maps onto the int32 tag.

soa_grow_capacity pic_soa Function

Capacity that covers required elements under the geometric policy.

Read more…
soa_hash64_int32_field pic_soa Subroutine

Fold the first n elements of an integer(int32) field into a 64-bit hash.

soa_hash64_int64_field pic_soa Subroutine

Fold the first n elements of an integer(int64) field into a 64-bit hash.

soa_hash64_logical_field pic_soa Subroutine

Fold the first n elements of a logical field into a 64-bit hash.

soa_hash64_real_dp_field pic_soa Subroutine

Fold the first n elements of a real(dp) field into a 64-bit hash.

soa_hash64_real_sp_field pic_soa Subroutine

Fold the first n elements of a real(sp) field into a 64-bit hash.

soa_hash_begin pic_soa Interface

Reset a hash accumulator and fold in a container’s identity.

Read more…
soa_hash_begin_32 pic_soa Subroutine

Reset a 32-bit hash accumulator and fold in a container’s identity.

Read more…
soa_hash_begin_64 pic_soa Subroutine

Reset a 64-bit hash accumulator and fold in a container’s identity.

Read more…
soa_hash_field pic_soa Interface

Fold the first n elements of one field into a hash accumulator.

Read more…
soa_hash_int32_field pic_soa Subroutine

Fold the first n elements of an integer(int32) field into a hash.

soa_hash_int64_field pic_soa Subroutine

Fold the first n elements of an integer(int64) field into a hash.

soa_hash_logical_field pic_soa Subroutine

Fold the first n elements of a default logical field into a hash.

soa_hash_real_dp_field pic_soa Subroutine

Fold the first n elements of a real(dp) field into a hash.

soa_hash_real_sp_field pic_soa Subroutine

Fold the first n elements of a real(sp) field into a hash.

soa_plan_resize pic_soa Subroutine

Work out what a resize to new_size elements has to do.

Read more…
soa_read_field pic_soa Interface

Read one field record back and check its length.

Read more…
soa_read_int32_field pic_soa Subroutine

Read an integer(int32) field record.

soa_read_int64_field pic_soa Subroutine

Read an integer(int64) field record.

soa_read_logical_field pic_soa Subroutine

Read a default logical field from an int32 record of 0/1 codes.

Read more…
soa_read_prologue pic_soa Subroutine

Read and validate the prologue, returning the element count.

Read more…
soa_read_real_dp_field pic_soa Subroutine

Read a real(dp) field record.

soa_read_real_sp_field pic_soa Subroutine

Read a real(sp) field record.

soa_resize_field pic_soa Interface

Give one field array a new allocated length, preserving a prefix.

Read more…
soa_resize_int32_field pic_soa Subroutine

Resize an integer(int32) field.

soa_resize_int64_field pic_soa Subroutine

Resize an integer(int64) field.

soa_resize_logical_field pic_soa Subroutine

Resize a default logical field.

soa_resize_real_dp_field pic_soa Subroutine

Resize a real(dp) field.

soa_resize_real_sp_field pic_soa Subroutine

Resize a real(sp) field.

soa_stream_bytes pic_soa Function

Exact size in bytes of the stream a container of n elements writes.

Read more…
soa_write_field pic_soa Interface

Write the first n elements of one field as a stream record.

Read more…
soa_write_int32_field pic_soa Subroutine

Write the first n elements of an integer(int32) field.

soa_write_int64_field pic_soa Subroutine

Write the first n elements of an integer(int64) field.

soa_write_logical_field pic_soa Subroutine

Write the first n elements of a default logical field as an int32 record of 0/1 codes.

Read more…
soa_write_prologue pic_soa Subroutine

Write the stream header, the schema record and the element count.

Read more…
soa_write_real_dp_field pic_soa Subroutine

Write the first n elements of a real(dp) field.

soa_write_real_sp_field pic_soa Subroutine

Write the first n elements of a real(sp) field.

sort pic_sorting Interface

The generic subroutine interface implementing the SORT algorithm, based on the introsort of David Musser. (Specification)

sort_index pic_sorting Interface

The generic subroutine interface implementing the SORT_INDEX algorithm, based on the "Rust" sort algorithm found in slice.rs https://github.com/rust-lang/rust/blob/90eb44a5897c39e3dff9c7e48e3973671dcd9496/src/liballoc/slice.rs#L2159 but modified to return an array of indices that would provide a stable sort of the rank one ARRAY input.

Read more…
sort_row pic_csr Subroutine

Insertion-sort one row segment lo:hi by column index.

Read more…
sp_decrease_ord_sort pic_sorting_ord_sort Subroutine
sp_decrease_sort pic_sorting_sort Subroutine
sp_increase_ord_sort pic_sorting_ord_sort Subroutine
sp_increase_sort pic_sorting_sort Subroutine
special_text pic_format Subroutine

Detect NaN and the infinities and return their canonical spelling.

Read more…
split pic_tokenizer Interface

Split a string on every occurrence of a delimiter, keeping empty fields.

Read more…
split_char_char pic_tokenizer Function

Split a character string on a character delimiter.

split_char_string pic_tokenizer Function

Split a character string on a string_type delimiter.

split_string_char pic_tokenizer Function

Split a string_type on a character delimiter.

split_string_string pic_tokenizer Function

Split a string_type on a string_type delimiter.

splitmix64_next pic_rng Function

Advance the state by the golden-ratio increment and return the mixed 64-bit output.

splitmix64_next_below pic_rng Function

Uniform integer in [0, n) from a SplitMix64 generator.

splitmix64_next_bernoulli_ppm pic_random_dist Function

True with probability ppm in a million, from a splitmix64_t generator.

splitmix64_next_exponential_dp pic_random_dist_real Function

Exponential deviate from a SplitMix64 generator.

splitmix64_next_exponential_int pic_random_dist Function

Exponential integer with the given mean, from a splitmix64_t generator.

splitmix64_next_normal_dp pic_random_dist_real Function

Normal deviate from a SplitMix64 generator.

splitmix64_next_poisson_int pic_random_dist Function

Poisson count with mean mean_milli/1000, from a splitmix64_t generator.

splitmix64_next_range pic_random_dist Function

Uniform integer in [lo, hi] from a splitmix64_t generator.

splitmix64_next_real_dp pic_rng Function

Uniform real(dp) in [0, 1) from a SplitMix64 generator.

splitmix64_next_u64 pic_rng Function

Full 64-bit random word. For SplitMix64 this is simply next; it exists so that both engines present the same interface to the shared real and bounded-integer conversions.

splitmix64_seed pic_rng Subroutine

Set the generator state. Any 64-bit value is a valid seed, including zero: SplitMix64 has no degenerate state.

splitmix64_uniform_below pic_random_dist Function

Uniform unsigned integer in [0, span_minus_1], by rejection.

starts_with pic_strings Interface

Check whether a string starts with substring or not

Read more…
starts_with_char_char pic_strings Function

Check whether a string starts with substring or not

starts_with_char_string pic_strings Function

Check whether a string starts with substring or not

starts_with_string_char pic_strings Function

Check whether a string starts with substring or not

starts_with_string_string pic_strings Function

Check whether a string starts with substring or not

std_dev pic_statistics Interface

Standard deviation of a 1-D array, returned as real(dp).

Read more…
std_dev_dp pic_statistics Function

Standard deviation of a real(dp) array.

std_dev_int32 pic_statistics Function

Standard deviation of an integer(int32) array.

std_dev_int64 pic_statistics Function

Standard deviation of an integer(int64) array.

std_dev_sp pic_statistics Function

Standard deviation of a real(sp) array.

stream_for pic_rng Interface

Derive an independent, reproducible generator for a stream id.

Read more…
stream_for_pcg32 pic_rng Subroutine

Build the PCG32 generator belonging to stream_id. The derived seed drives a local SplitMix64 which supplies both the LCG state and the stream selector.

stream_for_splitmix64 pic_rng Subroutine

Build the SplitMix64 generator belonging to stream_id.

stream_seed pic_rng Function

Deterministic seed for stream_id under master_seed.

Read more…
string_type pic_string_type Interface

Constructor for new string instances

strip pic_strings Interface

Remove leading and trailing whitespace characters.

Read more…
strip_char pic_strings Function

Remove leading and trailing whitespace characters.

strip_string pic_strings Function

Remove leading and trailing whitespace characters.

styled pic_ansi Function

Wrap text in the requested attributes and a reset.

Read more…
sum_3d_tensor_dp pic_array Function

perform the total sum of all components of type dp in a 3d tensor

sum_3d_tensor_int32 pic_array Function

perform the total sum of all components of type int32 in a 3d tensor

sum_3d_tensor_int64 pic_array Function

perform the total sum of all components of type int64 in a 3d tensor

sum_3d_tensor_sp pic_array Function

perform the total sum of all components of type sp in a 3d tensor

sum_matrix_dp pic_array Function

perform the total sum of all components of type dp in a matrix

sum_matrix_int32 pic_array Function

perform the total sum of all components of type int32 in a matrix

sum_matrix_int64 pic_array Function

perform the total sum of all components of type int64 in a matrix

sum_matrix_sp pic_array Function

perform the total sum of all components of type sp in a matrix

sum_vector_dp pic_array Function

perform the total sum of all components of type dp in a vector

sum_vector_int32 pic_array Function

perform the total sum of all components of type int32 in a vector

sum_vector_int64 pic_array Function

perform the total sum of all components of type int64 in a vector

sum_vector_sp pic_array Function

perform the total sum of all components of type sp in a vector

swap_entries pic_heap Subroutine

Exchange two heap slots, key, payload and insertion index together.

timer_get_elapsed_time pic_timer Function

Returns the elapsed time as a real(dp) variable

Read more…
timer_print_time pic_timer Subroutine

Prints the elapsed time at the time of calling

Read more…
timer_start pic_timer Subroutine

starts the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…
timer_stop pic_timer Subroutine

stop the timer. If OMP is enabled, it will use omp_get_wtime() if not, it will use Fortran’s system_clock

Read more…
to_c_char pic_strings Interface

Format or transfer other types as a string.

to_c_char_from_char pic_strings Function

Convert a Fortran character string to a C character array

Read more…
to_c_char_from_string pic_strings Function

Convert a Fortran string type to a C character array

Read more…
to_char pic_io Interface

converts a variable of type (int32, int64, sp, dp, char, logical) to a series of chars which is just a collecting of chars.

Read more…
to_char_char pic_io Function

transform a character to a string

to_char_count pic_io Function

format a non-negative cell/element count with an SI suffix 500 -> “500 cells”, 40000 -> “40.0 K cells”, 4_000_000 -> “4.0 M cells”, 4_000_000_000 -> “4.0 B cells”

to_char_dp pic_io Function

transform a real(dp) to a string

to_char_int32 pic_io Function

transform an int32 to a string

to_char_int64 pic_io Function

transform an int64 to a string

to_char_logical pic_io Function

tranform a logical to a string either true or false

to_char_matrix_dp pic_io Function
to_char_matrix_int32 pic_io Function
to_char_matrix_int64 pic_io Function
to_char_matrix_sp pic_io Function
to_char_sp pic_io Function

transform a real(sp) to a string

to_char_vector_dp pic_io Function
to_char_vector_int32 pic_io Function
to_char_vector_int64 pic_io Function
to_char_vector_sp pic_io Function
to_lower pic_string_type Interface

Returns the lowercase version of the character sequence hold by the input string

Read more…
to_lower pic_ascii Function

Convert character variable to lower case

Read more…
to_lower pic_ascii Interface

Returns a new character sequence which is the lower case version of the input character sequence This method is elemental and returns a character sequence

to_lower_string pic_string_type Function

Convert the character sequence hold by the input string to lower case

to_sentence pic_string_type Interface

Returns the sentencecase version of the character sequence hold by the input string

Read more…
to_sentence pic_ascii Function

Converts character sequence to sentence case

Read more…
to_sentence pic_ascii Interface

Returns a new character sequence which is the sentence case version of the input character sequence This method is elemental and returns a character sequence

to_sentence_string pic_string_type Function

Convert the character sequence hold by the input string to sentence case

to_string pic_strings Interface

Format or transfer other types as a string.

to_string_fixed pic_format Interface

Render a real in fixed point notation with an exact number of decimals. Fixed point rendering, never an exponent.

Read more…
to_string_fixed_dp pic_format Function

Fixed point rendering of a real(dp) value.

to_string_fixed_sp pic_format Function

Fixed point rendering of a real(sp) value.

Read more…
to_string_sci pic_format Interface

Render a real in scientific notation with a canonical exponent field. Scientific rendering, canonical form [-]D[.DDD]e[+-]NN.

Read more…
to_string_sci_dp pic_format Function

Scientific rendering of a real(dp) value.

to_string_sci_sp pic_format Function

Scientific rendering of a real(sp) value. See to_string_fixed_sp for why the widening to real(dp) is lossless.

to_string_width pic_format Interface

Render an integer right aligned in a field of the requested width. Right aligned integer rendering, blank padded on the left.

Read more…
to_string_width_i32 pic_format Function

Right aligned rendering of an integer(int32) value.

to_string_width_i64 pic_format Function

Right aligned rendering of an integer(int64) value.

to_title pic_string_type Interface

Returns the titlecase version of the character sequence hold by the input string

Read more…
to_title pic_ascii Function

Converts character sequence to title case

Read more…
to_title pic_ascii Interface

Returns a new character sequence which is the title case version of the input character sequence This method is elemental and returns a character sequence

to_title_string pic_string_type Function

Convert the character sequence hold by the input string to title case

to_upper pic_string_type Interface

Returns the uppercase version of the character sequence hold by the input string

Read more…
to_upper pic_ascii Function

Convert character variable to upper case

Read more…
to_upper pic_ascii Interface

Returns a new character sequence which is the upper case version of the input character sequence This method is elemental and returns a character sequence

to_upper_string pic_string_type Function

Convert the character sequence hold by the input string to upper case

tokenize pic_tokenizer Interface

Split a string into whitespace separated words.

Read more…
tokenize_char pic_tokenizer Function

Split a character string into whitespace separated words.

tokenize_string pic_tokenizer Function

Split a string_type into whitespace separated words.

trace_back pic_graph Subroutine

Walk prev from target back to source and return it forwards.

transpose_matrix_dp pic_array Subroutine

transpose a matrix of datatype dp

transpose_matrix_int32 pic_array Subroutine

transpose a matrix of datatype int32

transpose_matrix_int64 pic_array Subroutine

transpose a matrix of datatype int64

transpose_matrix_sp pic_array Subroutine

transpose a matrix of datatype sp

trim pic_string_type Interface

Returns the character sequence hold by the string without trailing spaces.

Read more…
trim_string pic_string_type Function

Returns the character sequence hold by the string without trailing spaces.

truncate_to_width pic_ansi Function

Cut text to at most width columns, never mid-character and never inside an escape sequence.

Read more…
u32_to_int32 pic_rng Function

Reinterpret an unsigned 32-bit value held in [0, 2**32) as the signed int32 with the same bit pattern. Done arithmetically rather than with transfer, and without ever passing an out-of-range value to int.

u64_add pic_uint64 Function

(a + b) reduced modulo 264, without ever overflowing a signed 64-bit integer. Operands are split into 32-bit halves with ibits, so each half sum stays below 233.

u64_less pic_uint64 Function

.true. when a < b with both operands read as unsigned 64-bit values.

Read more…
u64_mul pic_uint64 Function

(a * b) reduced modulo 2**64, without ever overflowing a signed 64-bit integer.

Read more…
u64_shr pic_uint64 Function

Logical (zero-filling) right shift of a 64-bit word by n bits, 0 <= n <= 63. Written with ibits rather than ishft(x, -n) or the Fortran 2008 shiftr for the portability reasons given in the module documentation.

unix_time_ms pic_clock Function

Milliseconds since 1970-01-01T00:00:00Z.

Read more…
unused_dummy_argument pic_string_type Subroutine

Do nothing but mark an unused dummy argument as such to acknowledge compile time warning like:

Read more…
update64_cdp_0 pic_array_hash Subroutine
update64_cdp_1 pic_array_hash Subroutine
update64_cdp_2 pic_array_hash Subroutine
update64_cdp_3 pic_array_hash Subroutine
update64_char_0 pic_array_hash Subroutine

Feed a character string, one iachar byte per character.

update64_char_1 pic_array_hash Subroutine
update64_csp_0 pic_array_hash Subroutine
update64_csp_1 pic_array_hash Subroutine
update64_csp_2 pic_array_hash Subroutine
update64_csp_3 pic_array_hash Subroutine
update64_int16_0 pic_array_hash Subroutine
update64_int16_1 pic_array_hash Subroutine
update64_int16_2 pic_array_hash Subroutine
update64_int16_3 pic_array_hash Subroutine
update64_int32_0 pic_array_hash Subroutine
update64_int32_1 pic_array_hash Subroutine
update64_int32_2 pic_array_hash Subroutine
update64_int32_3 pic_array_hash Subroutine
update64_int64_0 pic_array_hash Subroutine
update64_int64_1 pic_array_hash Subroutine
update64_int64_2 pic_array_hash Subroutine
update64_int64_3 pic_array_hash Subroutine
update64_int8_0 pic_array_hash Subroutine
update64_int8_1 pic_array_hash Subroutine
update64_int8_2 pic_array_hash Subroutine
update64_int8_3 pic_array_hash Subroutine
update64_logical_0 pic_array_hash Subroutine
update64_logical_1 pic_array_hash Subroutine
update64_logical_2 pic_array_hash Subroutine
update64_logical_3 pic_array_hash Subroutine
update64_rdp_0 pic_array_hash Subroutine
update64_rdp_1 pic_array_hash Subroutine
update64_rdp_2 pic_array_hash Subroutine
update64_rdp_3 pic_array_hash Subroutine
update64_rsp_0 pic_array_hash Subroutine
update64_rsp_1 pic_array_hash Subroutine
update64_rsp_2 pic_array_hash Subroutine
update64_rsp_3 pic_array_hash Subroutine
update_cdp_0 pic_array_hash Subroutine
update_cdp_1 pic_array_hash Subroutine
update_cdp_2 pic_array_hash Subroutine
update_cdp_3 pic_array_hash Subroutine
update_char_0 pic_array_hash Subroutine

Feed a character string, one iachar byte per character.

update_char_1 pic_array_hash Subroutine
update_csp_0 pic_array_hash Subroutine
update_csp_1 pic_array_hash Subroutine
update_csp_2 pic_array_hash Subroutine
update_csp_3 pic_array_hash Subroutine
update_int16_0 pic_array_hash Subroutine
update_int16_1 pic_array_hash Subroutine
update_int16_2 pic_array_hash Subroutine
update_int16_3 pic_array_hash Subroutine
update_int32_0 pic_array_hash Subroutine
update_int32_1 pic_array_hash Subroutine
update_int32_2 pic_array_hash Subroutine
update_int32_3 pic_array_hash Subroutine
update_int64_0 pic_array_hash Subroutine
update_int64_1 pic_array_hash Subroutine
update_int64_2 pic_array_hash Subroutine
update_int64_3 pic_array_hash Subroutine
update_int8_0 pic_array_hash Subroutine
update_int8_1 pic_array_hash Subroutine
update_int8_2 pic_array_hash Subroutine
update_int8_3 pic_array_hash Subroutine
update_logical_0 pic_array_hash Subroutine
update_logical_1 pic_array_hash Subroutine
update_logical_2 pic_array_hash Subroutine
update_logical_3 pic_array_hash Subroutine
update_rdp_0 pic_array_hash Subroutine
update_rdp_1 pic_array_hash Subroutine
update_rdp_2 pic_array_hash Subroutine
update_rdp_3 pic_array_hash Subroutine
update_rsp_0 pic_array_hash Subroutine
update_rsp_1 pic_array_hash Subroutine
update_rsp_2 pic_array_hash Subroutine
update_rsp_3 pic_array_hash Subroutine
variance pic_statistics Interface

Variance of a 1-D array, returned as real(dp).

Read more…
variance_dp pic_statistics Function

Variance of a real(dp) array (core implementation, two-pass).

variance_int32 pic_statistics Function

Variance of an integer(int32) array.

variance_int64 pic_statistics Function

Variance of an integer(int64) array.

variance_sp pic_statistics Function

Variance of a real(sp) array.

vec_dp_append pic_vector Subroutine

Append many elements, growing once rather than once per element.

vec_dp_as_array pic_vector Function

A copy holding exactly size() elements.

vec_dp_at pic_vector Subroutine

Read element index, 1-based. ERROR_BOUNDS when out of range.

vec_dp_capacity pic_vector Function

Elements that fit before the next reallocation.

vec_dp_clear pic_vector Subroutine

Drop every element but keep the allocated storage, so a vector reused across iterations of an outer loop stops reallocating.

vec_dp_destroy pic_vector Subroutine

Release all storage and reset to the empty state.

vec_dp_get_unchecked pic_vector Function

Element index with no bounds check, for hot loops that have already established the range. Reading outside 1:size() is undefined.

vec_dp_grow pic_vector Subroutine

Ensure capacity for at least needed elements, preserving the live ones. Capacity starts at PIC_VECTOR_MIN_CAPACITY and doubles, which keeps a run of push_back calls amortised O(1).

vec_dp_is_empty pic_vector Function

.true. when there are no live elements.

vec_dp_pop_back pic_vector Subroutine

Remove and return the last element. ERROR_BOUNDS when empty, in which case the vector is unchanged.

vec_dp_push_back pic_vector Subroutine

Append one element. ERROR_ALLOC if storage cannot be grown, in which case the vector is unchanged.

vec_dp_reserve pic_vector Subroutine

Make room for at least n elements. size() is unchanged.

vec_dp_resize pic_vector Subroutine

Set the length to n, padding with fill when growing and dropping elements from the end when shrinking.

vec_dp_set pic_vector Subroutine

Overwrite element index, 1-based. ERROR_BOUNDS when out of range; this never extends the vector, use push_back or resize for that.

vec_dp_shrink_to_fit pic_vector Subroutine

Release capacity beyond size().

vec_dp_size pic_vector Function

Number of live elements.

vec_dp_take pic_vector Subroutine

Hand the storage over to array, exactly sized, without copying the elements. The vector is left empty and without storage.

Read more…
vec_int32_append pic_vector Subroutine

Append many elements, growing once rather than once per element.

vec_int32_as_array pic_vector Function

A copy holding exactly size() elements.

vec_int32_at pic_vector Subroutine

Read element index, 1-based. ERROR_BOUNDS when out of range.

vec_int32_capacity pic_vector Function

Elements that fit before the next reallocation.

vec_int32_clear pic_vector Subroutine

Drop every element but keep the allocated storage, so a vector reused across iterations of an outer loop stops reallocating.

vec_int32_destroy pic_vector Subroutine

Release all storage and reset to the empty state.

vec_int32_get_unchecked pic_vector Function

Element index with no bounds check, for hot loops that have already established the range. Reading outside 1:size() is undefined.

vec_int32_grow pic_vector Subroutine

Ensure capacity for at least needed elements, preserving the live ones. Capacity starts at PIC_VECTOR_MIN_CAPACITY and doubles, which keeps a run of push_back calls amortised O(1).

vec_int32_is_empty pic_vector Function

.true. when there are no live elements.

vec_int32_pop_back pic_vector Subroutine

Remove and return the last element. ERROR_BOUNDS when empty, in which case the vector is unchanged.

vec_int32_push_back pic_vector Subroutine

Append one element. ERROR_ALLOC if storage cannot be grown, in which case the vector is unchanged.

vec_int32_reserve pic_vector Subroutine

Make room for at least n elements. size() is unchanged.

vec_int32_resize pic_vector Subroutine

Set the length to n, padding with fill when growing and dropping elements from the end when shrinking.

vec_int32_set pic_vector Subroutine

Overwrite element index, 1-based. ERROR_BOUNDS when out of range; this never extends the vector, use push_back or resize for that.

vec_int32_shrink_to_fit pic_vector Subroutine

Release capacity beyond size().

vec_int32_size pic_vector Function

Number of live elements.

vec_int32_take pic_vector Subroutine

Hand the storage over to array, exactly sized, without copying the elements. The vector is left empty and without storage.

Read more…
vec_int64_append pic_vector Subroutine

Append many elements, growing once rather than once per element.

vec_int64_as_array pic_vector Function

A copy holding exactly size() elements.

vec_int64_at pic_vector Subroutine

Read element index, 1-based. ERROR_BOUNDS when out of range.

vec_int64_capacity pic_vector Function

Elements that fit before the next reallocation.

vec_int64_clear pic_vector Subroutine

Drop every element but keep the allocated storage, so a vector reused across iterations of an outer loop stops reallocating.

vec_int64_destroy pic_vector Subroutine

Release all storage and reset to the empty state.

vec_int64_get_unchecked pic_vector Function

Element index with no bounds check, for hot loops that have already established the range. Reading outside 1:size() is undefined.

vec_int64_grow pic_vector Subroutine

Ensure capacity for at least needed elements, preserving the live ones. Capacity starts at PIC_VECTOR_MIN_CAPACITY and doubles, which keeps a run of push_back calls amortised O(1).

vec_int64_is_empty pic_vector Function

.true. when there are no live elements.

vec_int64_pop_back pic_vector Subroutine

Remove and return the last element. ERROR_BOUNDS when empty, in which case the vector is unchanged.

vec_int64_push_back pic_vector Subroutine

Append one element. ERROR_ALLOC if storage cannot be grown, in which case the vector is unchanged.

vec_int64_reserve pic_vector Subroutine

Make room for at least n elements. size() is unchanged.

vec_int64_resize pic_vector Subroutine

Set the length to n, padding with fill when growing and dropping elements from the end when shrinking.

vec_int64_set pic_vector Subroutine

Overwrite element index, 1-based. ERROR_BOUNDS when out of range; this never extends the vector, use push_back or resize for that.

vec_int64_shrink_to_fit pic_vector Subroutine

Release capacity beyond size().

vec_int64_size pic_vector Function

Number of live elements.

vec_int64_take pic_vector Subroutine

Hand the storage over to array, exactly sized, without copying the elements. The vector is left empty and without storage.

Read more…
vec_string_append pic_vector Subroutine

Append many elements, growing once rather than once per element.

vec_string_as_array pic_vector Function

A copy holding exactly size() elements.

vec_string_at pic_vector Subroutine

Read element index, 1-based. ERROR_BOUNDS when out of range.

vec_string_capacity pic_vector Function

Elements that fit before the next reallocation.

vec_string_clear pic_vector Subroutine

Drop every element but keep the allocated storage, so a vector reused across iterations of an outer loop stops reallocating.

vec_string_destroy pic_vector Subroutine

Release all storage and reset to the empty state.

vec_string_get_unchecked pic_vector Function

Element index with no bounds check, for hot loops that have already established the range. Reading outside 1:size() is undefined.

vec_string_grow pic_vector Subroutine

Ensure capacity for at least needed elements, preserving the live ones. Capacity starts at PIC_VECTOR_MIN_CAPACITY and doubles, which keeps a run of push_back calls amortised O(1).

vec_string_is_empty pic_vector Function

.true. when there are no live elements.

vec_string_pop_back pic_vector Subroutine

Remove and return the last element. ERROR_BOUNDS when empty, in which case the vector is unchanged.

vec_string_push_back pic_vector Subroutine

Append one element. ERROR_ALLOC if storage cannot be grown, in which case the vector is unchanged.

vec_string_reserve pic_vector Subroutine

Make room for at least n elements. size() is unchanged.

vec_string_resize pic_vector Subroutine

Set the length to n, padding with fill when growing and dropping elements from the end when shrinking.

vec_string_set pic_vector Subroutine

Overwrite element index, 1-based. ERROR_BOUNDS when out of range; this never extends the vector, use push_back or resize for that.

vec_string_shrink_to_fit pic_vector Subroutine

Release capacity beyond size().

vec_string_size pic_vector Function

Number of live elements.

vec_string_take pic_vector Subroutine

Hand the storage over to array, exactly sized, without copying the elements. The vector is left empty and without storage.

Read more…
verbose pic_logger Subroutine

Log a message that will only be printed at the verbose level of verbosity

Read more…
verify pic_string_type Interface

Scan a string for the absence of a set of characters. Verifies that all the characters in string belong to the set of characters in set.

Read more…
verify_char_string pic_string_type Function

Verify a character sequence for the absence any of the characters in a set of characters. In this version the set of characters is represented by a string.

verify_string_char pic_string_type Function

Verify a character sequence for the absence any of the characters in a set of characters. In this version the character sequences is represented by a string.

verify_string_string pic_string_type Function

Verify a character sequence for the absence any of the characters in a set of characters. In this version both the character sequence and the character set are represented by a string.

warning pic_logger Subroutine

Log a message that will only be printed at the warning level of verbosity

Read more…
write (formatted) pic_string_type Interface

Write the character sequence hold by the string to a connected formatted unit.

write (unformatted) pic_string_type Interface

Write the character sequence hold by the string to a connected unformatted unit.

write_array pic_serialize Interface

Write one length prefixed, type tagged record to a stream unit.

Read more…
write_char_record pic_serialize Subroutine

Write a character scalar record. The stored count is the number of characters, so a record of n characters occupies n payload bytes.

write_formatted pic_string_type Subroutine

Write the character sequence hold by the string to a connected formatted unit.

write_header pic_serialize Subroutine

Write the 16 byte stream header at the current position.

Read more…
write_int32_array pic_serialize Subroutine

Write an integer(int32) array record.

write_int64_array pic_serialize Subroutine

Write an integer(int64) array record.

write_log_line pic_logger Subroutine

Internal subroutine that will write the message to the log no interface to the public

write_real_dp_array pic_serialize Subroutine

Write a real(dp) array record.

write_real_sp_array pic_serialize Subroutine

Write a real(sp) array record.

write_record_header pic_serialize Subroutine

Write a record header: type tag followed by the element count. ok rather than err carries the outcome so that a stale error left in err by an earlier call cannot be mistaken for a failure here.

write_unformatted pic_string_type Subroutine

Write the character sequence hold by the string to a connected unformatted unit.

zfill pic_strings Interface

Left pad the input string with zeros.

zfill_char pic_strings Function

Left pad the input string with zeros

Read more…
zfill_string pic_strings Function

Left pad the input string with zeros

Read more…